当前位置: 首页>>代码示例>>Python>>正文


Python Org.remove_catalog_access_settings方法代码示例

本文整理汇总了Python中pyvcloud.vcd.org.Org.remove_catalog_access_settings方法的典型用法代码示例。如果您正苦于以下问题:Python Org.remove_catalog_access_settings方法的具体用法?Python Org.remove_catalog_access_settings怎么用?Python Org.remove_catalog_access_settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyvcloud.vcd.org.Org的用法示例。


在下文中一共展示了Org.remove_catalog_access_settings方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_07_remove_non_existing_catalog_access

# 需要导入模块: from pyvcloud.vcd.org import Org [as 别名]
# 或者: from pyvcloud.vcd.org.Org import remove_catalog_access_settings [as 别名]
 def test_07_remove_non_existing_catalog_access(self):
     org_in_use = self.client.get_org_by_name(
         self.config['vcd']['org_in_use'])
     org = Org(self.client, resource=org_in_use)
     try:
         org.remove_catalog_access_settings(
             self.config['vcd']['catalog'],
             access_settings_list=[
                 {'name': self.config['vcd']['access_org'], 'type': 'user'}
             ])
         self.fail("Removing non existing acl should fail")
     except Exception:
         pass
开发者ID:rdbwebster,项目名称:pyvcloud,代码行数:15,代码来源:vcd_catalog.py

示例2: test_03_remove_all_catalog_access

# 需要导入模块: from pyvcloud.vcd.org import Org [as 别名]
# 或者: from pyvcloud.vcd.org.Org import remove_catalog_access_settings [as 别名]
 def test_03_remove_all_catalog_access(self):
     org_in_use = self.client.get_org_by_name(
         self.config['vcd']['org_in_use'])
     org = Org(self.client, resource=org_in_use)
     control_access = org.remove_catalog_access_settings(
         self.config['vcd']['catalog'], remove_all=True)
     self.assertFalse(hasattr(control_access, 'AccessSettings'))
开发者ID:rdbwebster,项目名称:pyvcloud,代码行数:9,代码来源:vcd_catalog.py

示例3: test_10_remove_last_catalog_access

# 需要导入模块: from pyvcloud.vcd.org import Org [as 别名]
# 或者: from pyvcloud.vcd.org.Org import remove_catalog_access_settings [as 别名]
 def test_10_remove_last_catalog_access(self):
     org_in_use = self.client.get_org_by_name(
         self.config['vcd']['org_in_use'])
     org = Org(self.client, resource=org_in_use)
     control_access = org.remove_catalog_access_settings(
         self.config['vcd']['catalog'],
         access_settings_list=[
             {'name': self.config['vcd']['access_user1'], 'type': 'user'}
         ])
     self.assertFalse(hasattr(control_access, 'AccessSettings'))
开发者ID:rdbwebster,项目名称:pyvcloud,代码行数:12,代码来源:vcd_catalog.py

示例4: remove

# 需要导入模块: from pyvcloud.vcd.org import Org [as 别名]
# 或者: from pyvcloud.vcd.org.Org import remove_catalog_access_settings [as 别名]
def remove(ctx, catalog_name, access_list, all):
    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)

        if all:
            click.confirm(
                'Do you want to remove all access settings from the catalog '
                '\'%s\'' % catalog_name,
                abort=True)
        org.remove_catalog_access_settings(
            catalog_name=catalog_name,
            access_settings_list=acl_str_to_list_of_dict(access_list),
            remove_all=all)
        stdout('Access settings removed from catalog \'%s\'.' % catalog_name,
               ctx)
    except Exception as e:
        stderr(e, ctx)
开发者ID:vmware,项目名称:vca-cli,代码行数:22,代码来源:catalog.py

示例5: test_06_remove_catalog_access

# 需要导入模块: from pyvcloud.vcd.org import Org [as 别名]
# 或者: from pyvcloud.vcd.org.Org import remove_catalog_access_settings [as 别名]
    def test_06_remove_catalog_access(self):
        org_in_use = self.client.get_org_by_name(
            self.config['vcd']['org_in_use'])
        org = Org(self.client, resource=org_in_use)
        control_access = org.remove_catalog_access_settings(
            self.config['vcd']['catalog'],
            access_settings_list=[
                {'name': self.config['vcd']['access_user'], 'type': 'user'},
                {'name': self.config['vcd']['access_org'], 'type': 'org'}

            ])
        assert len(control_access.AccessSettings.AccessSetting) == 1
开发者ID:rdbwebster,项目名称:pyvcloud,代码行数:14,代码来源:vcd_catalog.py


注:本文中的pyvcloud.vcd.org.Org.remove_catalog_access_settings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。