[Octa-list] rhev.list_networks

Aron Parsons aron at redhat.com
Mon Apr 18 13:57:45 UTC 2011

Yes.  'rhevm' should be used for RHEV-M/hypervisor communication, not for VMs to run on (especially when users are the ones building the VMs).

Aron Parsons, RHCA
Senior Consultant
Red Hat Consulting

----- Original Message -----
From: "Greg Swift" <gregswift at gmail.com>
To: octa-list at redhat.com
Sent: Friday, April 15, 2011 6:52:43 PM
Subject: [Octa-list] rhev.list_networks

So... should you really be skipping rhevm?


    def list_networks(self):
        networks = []

        (response, status, reason) = self.request('GET', 'networks')
        xml = ElementTree.XML(response)

        for network in xml:
            vm_id = network.attrib['id']
            name = network.findtext('name')
            description = network.findtext('description')

            # skip the management networks
            if name == 'rhevm' or description == 'Management Network':

            networks.append( { 'id'          : vm_id,
                               'name'        : name,
                               'description' : description } )

        return networks

Octa-list mailing list
Octa-list at redhat.com

More information about the Octa-list mailing list