MCPcopy Create free account
hub / github.com/apache/cloudstack / assign

Method assign

tools/marvin/marvin/lib/base.py:3102–3111  ·  view source on GitHub ↗

Assign virtual machines to load balancing rule

(self, apiclient, vms=None, vmidipmap=None)

Source from the content-addressed store, hash-verified

3100 return
3101
3102 def assign(self, apiclient, vms=None, vmidipmap=None):
3103 """Assign virtual machines to load balancing rule"""
3104 cmd = assignToLoadBalancerRule.assignToLoadBalancerRuleCmd()
3105 cmd.id = self.id
3106 if vmidipmap:
3107 cmd.vmidipmap = vmidipmap
3108 if vms:
3109 cmd.virtualmachineids = [str(vm.id) for vm in vms]
3110 apiclient.assignToLoadBalancerRule(cmd)
3111 return
3112
3113 def remove(self, apiclient, vms=None, vmidipmap=None):
3114 """Remove virtual machines from load balancing rule"""

Calls

no outgoing calls