Revision 2f8598a5 lib/backend.py
b/lib/backend.py | ||
---|---|---|
150 | 150 |
|
151 | 151 |
|
152 | 152 |
def GetNodeInfo(vgname): |
153 |
""" gives back a hash with different informations |
|
154 |
about the node |
|
153 |
"""Gives back a hash with different informations about the node. |
|
155 | 154 |
|
156 | 155 |
Returns: |
157 | 156 |
{ 'vg_size' : xxx, 'vg_free' : xxx, 'memory_domain0': xxx, |
... | ... | |
238 | 237 |
|
239 | 238 |
|
240 | 239 |
def ListVolumeGroups(): |
241 |
"""List the volume groups and their size |
|
240 |
"""List the volume groups and their size.
|
|
242 | 241 |
|
243 | 242 |
Returns: |
244 | 243 |
Dictionary with keys volume name and values the size of the volume |
... | ... | |
277 | 276 |
|
278 | 277 |
|
279 | 278 |
def BridgesExist(bridges_list): |
280 |
"""Check if a list of bridges exist on the current node |
|
279 |
"""Check if a list of bridges exist on the current node.
|
|
281 | 280 |
|
282 | 281 |
Returns: |
283 | 282 |
True if all of them exist, false otherwise |
... | ... | |
291 | 290 |
|
292 | 291 |
|
293 | 292 |
def GetInstanceList(): |
294 |
""" provides a list of instances
|
|
293 |
"""Provides a list of instances.
|
|
295 | 294 |
|
296 | 295 |
Returns: |
297 | 296 |
A list of all running instances on the current node |
... | ... | |
309 | 308 |
|
310 | 309 |
|
311 | 310 |
def GetInstanceInfo(instance): |
312 |
""" gives back the informations about an instance |
|
313 |
as a dictonary |
|
311 |
"""Gives back the informations about an instance as a dictionary. |
|
314 | 312 |
|
315 | 313 |
Args: |
316 | 314 |
instance: name of the instance (ex. instance1.example.com) |
... | ... | |
367 | 365 |
|
368 | 366 |
|
369 | 367 |
def AddOSToInstance(instance, os_disk, swap_disk): |
370 |
"""Add an os to an instance.
|
|
368 |
"""Add an OS to an instance.
|
|
371 | 369 |
|
372 | 370 |
Args: |
373 | 371 |
instance: the instance object |
... | ... | |
914 | 912 |
return None |
915 | 913 |
|
916 | 914 |
def _OSOndiskVersion(name, os_dir): |
917 |
"""Compute and return the api version of a given OS.
|
|
915 |
"""Compute and return the API version of a given OS.
|
|
918 | 916 |
|
919 |
This function will try to read the api version of the os given by
|
|
917 |
This function will try to read the API version of the os given by
|
|
920 | 918 |
the 'name' parameter and residing in the 'os_dir' directory. |
921 | 919 |
|
922 | 920 |
Return value will be either an integer denoting the version or None in the |
Also available in: Unified diff