Ejemplo n.º 1
0
 async def get_all_volumes(session: Gateway):
     response = session.ReadVolumes()
     volumes = []
     if 'Volumes' in response:
         for volume in response['Volumes']:
             volumes.append(volume)
     return volumes
Ejemplo n.º 2
0
import sys
sys.path.append("..")
from osc_sdk_python import Gateway

gw = Gateway()

vms = gw.ReadVms()
assert isinstance(vms, dict)
assert isinstance(vms["Vms"], list)

vols = gw.ReadVolumes()
assert isinstance(vols, dict)
assert isinstance(vols["Volumes"], list)