def create_LB_Rule(self, public_ip, network, vmarray, services=None): self.debug("Creating LB rule for IP address: %s" % public_ip.ipaddress.ipaddress) objservices = None if services: objservices = services else: objservices = self.services["lbrule"] lb_rule = LoadBalancerRule.create(self.apiclient, objservices, ipaddressid=public_ip.ipaddress.id, accountid=self.account.name, networkid=network.id, vpcid=self.vpc.id, domainid=self.account.domainid) self.debug("Adding virtual machines %s and %s to LB rule" % (vmarray[0], vmarray[1])) lb_rule.assign(self.apiclient, vmarray) self.debug("Adding NetworkACl rules to make NAT rule accessible") nwacl_nat = NetworkACL.create(self.apiclient, objservices, networkid=network.id, traffictype='Ingress') self.debug('nwacl_nat=%s' % nwacl_nat.__dict__) return lb_rule
def create_LB_Rule(self, public_ip, network, vmarray, services=None): self.debug("Creating LB rule for IP address: %s" % public_ip.ipaddress.ipaddress) objservices = None if services: objservices = services else: objservices = self.services["lbrule"] lb_rule = LoadBalancerRule.create( self.apiclient, objservices, ipaddressid=public_ip.ipaddress.id, accountid=self.account.name, networkid=network.id, vpcid=self.vpc.id, domainid=self.account.domainid ) self.debug("Adding virtual machines %s and %s to LB rule" % (vmarray[0], vmarray[1])) lb_rule.assign(self.apiclient, vmarray) self.debug("Adding NetworkACl rules to make NAT rule accessible") nwacl_nat = NetworkACL.create(self.apiclient, objservices, networkid=network.id, traffictype='Ingress' ) self.debug('nwacl_nat=%s' % nwacl_nat.__dict__) return lb_rule
def create_LB_Rule(self, public_ip, network, vmarray, services=None): self.debug("Creating LB rule for IP address: %s" % public_ip.ipaddress.ipaddress) objservices = None if services: objservices = services else: objservices = self.services["lbrule"] lb_rule = LoadBalancerRule.create(self.apiclient, objservices, ipaddressid=public_ip.ipaddress.id, accountid=self.account.name, networkid=network.id, vpcid=self.vpc.id, domainid=self.account.domainid) self.debug("Adding virtual machines %s and %s to LB rule" % (vmarray)) lb_rule.assign(self.apiclient, vmarray) return lb_rule
def create_LB_Rule(self, public_ip, network, vmarray, services=None): self.debug("Creating LB rule for IP address: %s" % public_ip.ipaddress.ipaddress) objservices = None if services: objservices = services else: objservices = self.services["lbrule"] lb_rule = LoadBalancerRule.create( self.apiclient, objservices, ipaddressid=public_ip.ipaddress.id, accountid=self.account.name, networkid=network.id, vpcid=self.vpc.id, domainid=self.account.domainid, ) self.debug("Adding virtual machines %s and %s to LB rule" % (vmarray)) lb_rule.assign(self.apiclient, vmarray) return lb_rule