def test_0080_list_idisk(self): """Test the method VDC.list_idisk(). This test passes if it lists vdc idisk and its id. """ vdc = VDC(TestOrgVDC._client, href=TestOrgVDC._new_vdc_href) idisk_list = vdc.list_idisk() self.assertTrue(len(idisk_list) > 0)
def list_disk(ctx, vdc_name): try: restore_session(ctx) client = ctx.obj['client'] in_use_org_href = ctx.obj['profiles'].get('org_href') org = Org(client, in_use_org_href) vdc_resource = org.get_vdc(vdc_name) vdc = VDC(client, resource=vdc_resource) disk_list = vdc.list_idisk() stdout(disk_list, ctx) except Exception as e: stderr(e, ctx)