def _setup(self): # Required arguments self.vm_name = self.args.vmname self.datastore_name = self.args.datastorename # Optional arguments self.item_name = (self.args.itemname if self.args.itemname else rand('vmtx-item-')) self.servicemanager = self.get_service_manager() self.client = ClsApiClient(self.servicemanager) self.helper = ClsApiHelper(self.client, self.skip_verification)
def _setup(self): # Required arguments self.item_name = self.args.itemname self.datacenter_name = self.args.datacentername self.folder_name = self.args.foldername self.resource_pool_name = self.args.resourcepoolname self.datastore_name = self.args.datastorename # Optional arguments self.vm_name = self.args.vmname if self.args.vmname else rand('vm-') self.servicemanager = self.get_service_manager() self.client = ClsApiClient(self.servicemanager) self.helper = ClsApiHelper(self.client, self.skip_verification)
def _setup(self): # Required arguments self.datacenter_name = self.args.datacentername self.resource_pool_name = self.args.resourcepoolname self.item_name = self.args.itemname # Optional arguments self.vm_name = (self.args.vmname if self.args.vmname else rand('checked-out-vm-')) self.servicemanager = self.get_service_manager() self.client = ClsApiClient(self.servicemanager) self.helper = ClsApiHelper(self.client, self.skip_verification) session = get_unverified_session() if self.skip_verification else None self.vsphere_client = create_vsphere_client(server=self.server, username=self.username, password=self.password, session=session)