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


Python StaticNATRule.disable方法代码示例

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


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

示例1: delete_StaticNatRule_For_VM

# 需要导入模块: from marvin.lib.base import StaticNATRule [as 别名]
# 或者: from marvin.lib.base.StaticNATRule import disable [as 别名]
 def delete_StaticNatRule_For_VM(self, vm, public_ip):
     self.debug("Disabling static NAT for public IP - %s" % public_ip.ipaddress.ipaddress)
     StaticNATRule.disable(self.api_client,
                           ipaddressid=public_ip.ipaddress.id,
                           virtualmachineid=vm.id
                           )
     self.debug("Static NAT disabled for public IP - %s" % public_ip.ipaddress.ipaddress)
开发者ID:CIETstudents,项目名称:cloudstack,代码行数:9,代码来源:nuageTestCase.py

示例2: delete_StaticNatRule_For_VM

# 需要导入模块: from marvin.lib.base import StaticNATRule [as 别名]
# 或者: from marvin.lib.base.StaticNATRule import disable [as 别名]
 def delete_StaticNatRule_For_VM(self, public_ip):
     self.debug("Disabling Static NAT rule on public IP - %s" %
                public_ip.ipaddress.ipaddress)
     StaticNATRule.disable(self.api_client,
                           ipaddressid=public_ip.ipaddress.id
                           )
     self.debug("Static NAT rule disabled on public IP - %s" %
                public_ip.ipaddress.ipaddress)
开发者ID:prashanthvarma,项目名称:cloudstack,代码行数:10,代码来源:nuageTestCase.py

示例3: delete_StaticNatRule_For_VM

# 需要导入模块: from marvin.lib.base import StaticNATRule [as 别名]
# 或者: from marvin.lib.base.StaticNATRule import disable [as 别名]
 def delete_StaticNatRule_For_VM(self, vm, public_ip):
     self.debug("Disabling static NAT for IP: %s" %
                                                     public_ip.ipaddress.ipaddress)
     try:
             StaticNATRule.disable(
                                     self.apiclient,
                                     ipaddressid=public_ip.ipaddress.id,
                                     virtualmachineid=vm.id,
                                     )
             self.debug("Static NAT disabled for IP: %s" %
                                                     public_ip.ipaddress.ipaddress)
     except Exception as e:
             self.fail("Failed to disabled static NAT on IP: %s - %s" % (
                                                 public_ip.ipaddress.ipaddress, e))
开发者ID:MANIKANDANVEN,项目名称:cloudstack,代码行数:16,代码来源:test_vpc_network_staticnatrule.py

示例4: removeNetworkRules

# 需要导入模块: from marvin.lib.base import StaticNATRule [as 别名]
# 或者: from marvin.lib.base.StaticNATRule import disable [as 别名]
    def removeNetworkRules(self, rule, ipaddressobj):
        """ Remove specified rule on acquired public IP and
        default network of virtual machine
        """
        self.fw_rule.delete(self.apiclient)

        if rule == STATIC_NAT_RULE:
            StaticNATRule.disable(
                self.apiclient,
                ipaddressobj.ipaddress.id)

        elif rule == LB_RULE:
            self.lb_rule.delete(self.apiclient)
        else:
            self.nat_rule.delete(self.apiclient)
        return
开发者ID:Tosta-Mixta,项目名称:cloudstack,代码行数:18,代码来源:test_network.py

示例5: removeNetworkRules

# 需要导入模块: from marvin.lib.base import StaticNATRule [as 别名]
# 或者: from marvin.lib.base.StaticNATRule import disable [as 别名]
    def removeNetworkRules(self, rule):
        """ Remove specified rule on acquired public IP and
        default network of virtual machine
        """
        self.fw_rule.delete(self.apiclient)

        if rule == STATIC_NAT_RULE:
            StaticNATRule.disable(
                self.apiclient,
                self.ipaddress.ipaddress.id)

        elif rule == LB_RULE:
            self.lb_rule.delete(self.apiclient)
        else:
            self.nat_rule.delete(self.apiclient)

        logger.debug("Releasing IP %s from account %s" % (self.ipaddress.ipaddress.ipaddress, self.account.name))
        self.ipaddress.delete(self.apiclient)

        return
开发者ID:PCextreme,项目名称:cloudstack,代码行数:22,代码来源:test_network.py


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