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


Python CloudProvider.delete_secgroup方法代码示例

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


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

示例1: delete

# 需要导入模块: from cloudmesh_client.cloud.iaas.CloudProvider import CloudProvider [as 别名]
# 或者: from cloudmesh_client.cloud.iaas.CloudProvider.CloudProvider import delete_secgroup [as 别名]
    def delete(cls,
               category='general',
               group=None,
               name=None):
        # name is anme of the rule

        if category=='general':
            if name is None and group is not None:

                # delete the entire group
                cls.cm.delete(kind="secgrouprule", group=group)


            elif name is not None and group is not None:
                # delete specific rule
                cls.cm.delete(name=name, kind="secgrouprule", group=group)
            elif name is None and group is None:
                # delete all groups
                cls.cm.delete(kind="secgrouprule")

            if group == Default.secgroup or Default.secgroup is None:
                cls.reset_defaults()

        else:
            provider = CloudProvider(category).provider

            # delete on cloud
            if  group is not None:
                provider.delete_secgroup(name)
                # delete the entire group
            elif group is None:
                # delete all groups
                pass
开发者ID:cloudmesh,项目名称:client,代码行数:35,代码来源:secgroup.py

示例2: delete_secgroup

# 需要导入模块: from cloudmesh_client.cloud.iaas.CloudProvider import CloudProvider [as 别名]
# 或者: from cloudmesh_client.cloud.iaas.CloudProvider.CloudProvider import delete_secgroup [as 别名]
 def delete_secgroup(cls, name=None, cloud=None):
     try:
         # Find the secgroup from the cloud
         cloud_provider = CloudProvider(cloud).provider
         result = cloud_provider.delete_secgroup(name)
         return result
     except Exception as ex:
         Console.error("delete group")
开发者ID:cloudmesh,项目名称:client,代码行数:10,代码来源:secgroup.py

示例3: delete_secgroup

# 需要导入模块: from cloudmesh_client.cloud.iaas.CloudProvider import CloudProvider [as 别名]
# 或者: from cloudmesh_client.cloud.iaas.CloudProvider.CloudProvider import delete_secgroup [as 别名]
 def delete_secgroup(cls, label, cloud):
     try:
         # Find the secgroup from the cloud
         cloud_provider = CloudProvider(cloud).provider
         result = cloud_provider.delete_secgroup(label)
         return result
     except Exception as ex:
         Console.error(ex.message, ex)
开发者ID:alistairking,项目名称:client,代码行数:10,代码来源:secgroup.py

示例4: delete_group_cloud

# 需要导入模块: from cloudmesh_client.cloud.iaas.CloudProvider import CloudProvider [as 别名]
# 或者: from cloudmesh_client.cloud.iaas.CloudProvider.CloudProvider import delete_secgroup [as 别名]
 def delete_group_cloud(cls, cloud, groupname):
     provider = CloudProvider(cloud).provider
     return provider.delete_secgroup(groupname)
开发者ID:cloudmesh,项目名称:client,代码行数:5,代码来源:secgroup.py


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