[Je suis une fougère] Oubli dans nolslib.py
Ignore-this: f4f042b07f36f7b71019048ed5c10b49 darcs-hash:20120807224120-b6762-c4eba9c450ee6fe9046d2c6798159e8df20c8370.gz
This commit is contained in:
parent
8eb149db63
commit
af9c060e1c
1 changed files with 13 additions and 1 deletions
|
@ -99,12 +99,22 @@ class Nols(object):
|
||||||
XML_map = self.cmd("show volume-map", mode="XML")
|
XML_map = self.cmd("show volume-map", mode="XML")
|
||||||
root = fromstring(XML_map)
|
root = fromstring(XML_map)
|
||||||
tree = ElementTree(root)
|
tree = ElementTree(root)
|
||||||
Objects = tree.findall("OBJECT[@name='volume-view']")
|
|
||||||
|
## Cf juste en dessous
|
||||||
|
Objects = tree.findall("OBJECT")
|
||||||
|
#Objects = tree.findall("OBJECT[@name='volume-view']")
|
||||||
|
## Fin cf juste en dessous
|
||||||
|
|
||||||
for Object in Objects:
|
for Object in Objects:
|
||||||
# Quand on passera à wheezy, décommenter ces lignes, et virer
|
# Quand on passera à wheezy, décommenter ces lignes, et virer
|
||||||
# la merde que j'ai fait juste après.
|
# la merde que j'ai fait juste après.
|
||||||
#name = Object.findall("PROPERTY[@name='volume-name']")[0].text
|
#name = Object.findall("PROPERTY[@name='volume-name']")[0].text
|
||||||
#lun = Object.findall("OBJECT/PROPERTY[@name='lun']")[0].text
|
#lun = Object.findall("OBJECT/PROPERTY[@name='lun']")[0].text
|
||||||
|
|
||||||
|
######## Début merde que j'ai faite juste après ###########
|
||||||
|
if not (Object.attrib['name'] == "volume-view"):
|
||||||
|
pass
|
||||||
|
|
||||||
properties = Object.findall("PROPERTY")
|
properties = Object.findall("PROPERTY")
|
||||||
for property in properties:
|
for property in properties:
|
||||||
if property.attrib['name'] == "volume-name":
|
if property.attrib['name'] == "volume-name":
|
||||||
|
@ -120,6 +130,8 @@ class Nols(object):
|
||||||
lun = property.text
|
lun = property.text
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
####### Fin merde que j'ai faite juste après #############
|
||||||
|
|
||||||
|
|
||||||
if lun is None:
|
if lun is None:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue