def test__1001_vapp_control_access_retrieval(self): logged_in_org = self.client.get_org() org = Org(self.client, resource=logged_in_org) vdc_resource = org.get_vdc(self.config['vcd']['vdc']) vdc = VDC(self.client, resource=vdc_resource) vapp_resource = vdc.get_vapp(self.config['vcd']['vapp']) vapp = VApp(self.client, resource=vapp_resource) access_control_settings = vapp.get_access_control_settings() assert len(access_control_settings) > 0
def info(ctx, name): try: client = ctx.obj['client'] vdc_href = ctx.obj['profiles'].get('vdc_href') vdc = VDC(client, href=vdc_href) vapp_resource = vdc.get_vapp(name) vapp = VApp(client, resource=vapp_resource) md = vapp.get_metadata() access_control_settings = vapp.get_access_control_settings() result = vapp_to_dict(vapp_resource, md, access_control_settings) stdout(result, ctx) except Exception as e: stderr(e, ctx)