[Octa-list] rhev.list_networks
Greg Swift
gregswift at gmail.com
Fri Apr 15 22:52:43 UTC 2011
So... should you really be skipping rhevm?
-greg
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':
continue
networks.append( { 'id' : vm_id,
'name' : name,
'description' : description } )
return networks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/octa-list/attachments/20110415/af63f96f/attachment.htm>
More information about the Octa-list
mailing list