Manage VNF Appliance life cycle
| 7167 | return (apiclient.listVnfTemplates(cmd)) |
| 7168 | |
| 7169 | class VnfAppliance: |
| 7170 | """Manage VNF Appliance life cycle""" |
| 7171 | |
| 7172 | def __init__(self, items): |
| 7173 | self.__dict__.update(items) |
| 7174 | |
| 7175 | @classmethod |
| 7176 | def create(cls, apiclient, services, templateid=None, accountid=None, |
| 7177 | domainid=None, zoneid=None, networkids=None, |
| 7178 | serviceofferingid=None, securitygroupids=None, |
| 7179 | projectid=None, startvm=None, diskofferingid=None, |
| 7180 | affinitygroupnames=None, affinitygroupids=None, group=None, |
| 7181 | hostid=None, clusterid=None, keypair=None, ipaddress=None, mode='default', |
| 7182 | method='GET', hypervisor=None, customcpunumber=None, |
| 7183 | customcpuspeed=None, custommemory=None, rootdisksize=None, |
| 7184 | rootdiskcontroller=None, vpcid=None, macaddress=None, datadisktemplate_diskoffering_list={}, |
| 7185 | properties=None, nicnetworklist=None, bootmode=None, boottype=None, dynamicscalingenabled=None, |
| 7186 | userdataid=None, userdatadetails=None, extraconfig=None, |
| 7187 | vnfconfiguremanagement=None, vnfcidrlist=None): |
| 7188 | """Create the VNF appliance""" |
| 7189 | |
| 7190 | cmd = deployVnfAppliance.deployVnfApplianceCmd() |
| 7191 | |
| 7192 | if serviceofferingid: |
| 7193 | cmd.serviceofferingid = serviceofferingid |
| 7194 | elif "serviceoffering" in services: |
| 7195 | cmd.serviceofferingid = services["serviceoffering"] |
| 7196 | |
| 7197 | if zoneid: |
| 7198 | cmd.zoneid = zoneid |
| 7199 | elif "zoneid" in services: |
| 7200 | cmd.zoneid = services["zoneid"] |
| 7201 | |
| 7202 | if hypervisor: |
| 7203 | cmd.hypervisor = hypervisor |
| 7204 | |
| 7205 | if "displayname" in services: |
| 7206 | cmd.displayname = services["displayname"] |
| 7207 | |
| 7208 | if "name" in services: |
| 7209 | cmd.name = services["name"] |
| 7210 | |
| 7211 | if accountid: |
| 7212 | cmd.account = accountid |
| 7213 | elif "account" in services: |
| 7214 | cmd.account = services["account"] |
| 7215 | |
| 7216 | if domainid: |
| 7217 | cmd.domainid = domainid |
| 7218 | elif "domainid" in services: |
| 7219 | cmd.domainid = services["domainid"] |
| 7220 | |
| 7221 | if networkids: |
| 7222 | cmd.networkids = networkids |
| 7223 | allow_egress = False |
| 7224 | elif "networkids" in services: |
| 7225 | cmd.networkids = services["networkids"] |
| 7226 | allow_egress = False |