| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607 |
- <?php
- /* * ********************************************************************
- * ProxmoxVPS product developed. (2019-09-06)
- * *
- *
- * CREATED BY MODULESGARDEN -> http://modulesgarden.com
- * CONTACT -> contact@modulesgarden.com
- *
- *
- * This software is furnished under a license and may be used and copied
- * only in accordance with the terms of such license and with the
- * inclusion of the above copyright notice. This software or any other
- * copies thereof may not be provided or otherwise made available to any
- * other person. No title to and ownership of the software is hereby
- * transferred.
- *
- *
- * ******************************************************************** */
- namespace ModulesGarden\ProxmoxAddon\App\Repositories\Vps;
- use ModulesGarden\ProxmoxAddon\App\Repositories\AbstractProductConfigurationRepository;
- /**
- * Description of ProductConfigurationRepository
- * @author Pawel Kopec <pawelk@modulesgarden.com>
- * @version 1.0.0
- * @property string $firewalOptionPolicyIn;
- * @property string $firewalOptionPolicyOut;
- * @property array $permissionInformation;
- * @property string $archive
- * @property string $cloudInitStorage
- */
- class ProductConfigurationRepository extends AbstractProductConfigurationRepository
- {
- public function isDebug()
- {
- return $this->get("debugMode") == "on";
- }
- public function getVirtualization()
- {
- return $this->get("virtualization", 'qemu');
- }
- public function isQemu()
- {
- return $this->getVirtualization() == "qemu";
- }
- public function isLxc()
- {
- return $this->getVirtualization() == "lxc";
- }
- public function getDefaultNode()
- {
- return $this->get("defaultNode");
- }
- public function isCheckResources()
- {
- return $this->get('checkResources') == "on";
- }
- public function isBackupVmBeforeReinstall()
- {
- return $this->get('backupVmBeforeReinstall') == "on";
- }
- public function isRebootVmAfterChangePackage()
- {
- return $this->get('rebootVmAfterChangePackage') == "on";
- }
- public function isDeleteBackups()
- {
- return $this->get('deleteBackups') == "on";
- }
- public function isServerNameservers()
- {
- return $this->get('serverNameservers') == "on";
- }
- public function getConsoleHost()
- {
- return $this->get("consoleHost");
- }
- public function isOneUserPerVps()
- {
- return $this->get('oneUserPerVps') == "on";
- }
- public function getUserPrefix()
- {
- return $this->get("userPrefix");
- }
- public function getRealm()
- {
- return $this->get("realm", "pve");
- }
- public function getUserComment()
- {
- return $this->get("userComment");
- }
- public function getUserRole()
- {
- return $this->get("userRole");
- }
- public function getWelcomeEmailTemplateId()
- {
- return $this->get("welcomeEmailTemplateId");
- }
- public function getReinstallEmailTemplateId()
- {
- return $this->get("reinstallEmailTemplateId");
- }
- public function getServiceCreationFailedTemplateId()
- {
- return $this->get("serviceCreationFailedTemplateId");
- }
- public function getUpgradeNotificationTemplateId()
- {
- return $this->get("upgradeNotificationTemplateId");
- }
- public function isToDoList()
- {
- return $this->get("toDoList") == "on";
- }
- public function getCmode()
- {
- return $this->get("cmode") ;
- }
- public function getOsType()
- {
- return $this->get("ostype");
- }
- public function getPool()
- {
- return $this->get("pool");
- }
- public function getDescription()
- {
- return $this->get("description");
- }
- public function getTty()
- {
- return $this->get("tty");
- }
- public function isSshKeyPairs()
- {
- return $this->get("sshKeyPairs") == "on";
- }
- public function getArch()
- {
- return $this->get("arch");
- }
- public function isConsole()
- {
- return $this->get("console") == "on";
- }
- public function isOnboot()
- {
- return $this->get("onboot") == "on";
- }
- public function isProtection()
- {
- return $this->get("protection") == "on";
- }
- public function isStartup()
- {
- return $this->get("startup") == "on";
- }
- public function isSshDeletePrivateKey()
- {
- return $this->get("sshDeletePrivateKey") == "on";
- }
- public function getOsTemplate()
- {
- return $this->get("osTemplate");
- }
- public function getCpuunits()
- {
- return $this->get("cpuunits");
- }
- /**
- * @return int
- */
- public function getMemory()
- {
- return $this->get("memory");
- }
- /**
- * @return int
- */
- public function getProductId()
- {
- return $this->productId;
- }
- /**
- * @return int
- */
- public function getDiskSize()
- {
- return $this->get("diskSize");
- }
- /**
- * @return int
- */
- public function getAdditionalDiskSize()
- {
- return $this->get("additionalDiskSize");
- }
- /**
- * @return int
- */
- public function getMinimumRate()
- {
- return $this->get("minimumRate");
- }
- /**
- * @return int
- */
- public function getIpv4()
- {
- return $this->get("ipv4");
- }
- /**
- * @return int
- */
- public function getIpv6()
- {
- return $this->get("ipv6");
- }
- /**
- * @return int
- */
- public function getBackupMaxFiles()
- {
- return $this->get("backupMaxFiles");
- }
- /**
- * @return int
- */
- public function getCpulimit()
- {
- return $this->get("cpulimit");
- }
- /**
- * @return int
- */
- public function getCores()
- {
- return $this->get("cores");
- }
- /**
- * @return int
- */
- public function getSwap()
- {
- return $this->get("swap");
- }
- /**
- * @return int
- */
- public function getRate()
- {
- return $this->get("rate");
- }
- /**
- * @return int
- */
- public function getBackupMaxSize()
- {
- return $this->get("backupMaxSize");
- }
- /**
- * @return int
- */
- public function getBandwidth()
- {
- return $this->get("bandwidth");
- }
- /**
- * @return int
- */
- public function getSnapshotMaxFiles()
- {
- return $this->get("snapshotMaxFiles");
- }
- /**
- * @return int
- */
- public function getMountPointStorage()
- {
- return $this->get("mountPointStorage");
- }
- /**
- * @return int
- */
- public function isMountPointRo()
- {
- return $this->get("mountPointRo") == "on";
- }
- /**
- * @return int
- */
- public function isReplicate()
- {
- return $this->get("replicate") == "on";
- }
- /**
- * @return int
- */
- public function getMountPointAcl()
- {
- return $this->get("mountPointAcl");
- }
- /**
- * @return int
- */
- public function isMountPointQuota()
- {
- return $this->get("mountPointQuota") == "on";
- }
- /**
- * @return string
- */
- public function getIpv4NetworkMode()
- {
- return $this->get("ipv4NetworkMode");
- }
- /**
- * @return string
- */
- public function getIpv6NetworkMode()
- {
- return $this->get("ipv6NetworkMode");
- }
- /**
- * @return string
- */
- public function getPrivateBridge()
- {
- return $this->get("privateBridge");
- }
- /**
- * @return string
- */
- public function getBridge()
- {
- return $this->get("bridge");
- }
- /**
- * @return boolean
- */
- public function isNetworkFirewall()
- {
- return $this->get("networkFirewall") == "on";
- }
- /**
- * @return int
- */
- public function getTagFrom()
- {
- return $this->get("tagFrom");
- }
- /**
- * @return int
- */
- public function getTagTo()
- {
- return $this->get("tagTo");
- }
- /**
- * @return string
- */
- public function getSwapUnit()
- {
- return $this->get("swapUnit", "mb");
- }
- /**
- * @return string
- */
- public function getDiskUnit()
- {
- return $this->get("diskUnit", "gb");
- }
- /**
- * @return string
- */
- public function getMemoryUnit()
- {
- return $this->get("memoryUnit", "mb");
- }
- /**
- * @return string
- */
- public function getAdditionalDiskUnit()
- {
- return $this->get("additionalDiskUnit", "gb");
- }
- /**
- * @return array
- */
- public function getFirewallInterfaces()
- {
- return $this->get("firewallInterfaces");
- }
- /**
- * @return int
- */
- public function getFirewallMaxRules()
- {
- return $this->get("firewallMaxRules");
- }
- /**
- * @return bool
- */
- public function isLoadBalancer()
- {
- return $this->get("loadBalancer") == "on";
- }
- /**
- * @return bool
- */
- public function isLoadBalancerShutdownOnUpgrade()
- {
- return $this->get("loadBalancerShutdownOnUpgrade") == "on";
- }
- /**
- * @return string
- */
- public function getLoadBalancerOnUpgrade()
- {
- return $this->get("loadBalancerOnUpgrade");
- }
- /**
- * @return bool
- */
- public function isLoadBalancerStopOnUpgrade()
- {
- return $this->get("loadBalancerStopOnUpgrade") == "on";
- }
- /**
- * @return string
- */
- public function getBackupStorage()
- {
- return $this->get("backupStorage");
- }
- /**
- * @return bool
- */
- public function isBackupRouting()
- {
- return $this->get("backupRouting") == "on";
- }
- /**
- * @return int
- */
- public function getBackupStoreDays()
- {
- return $this->get("backupStoreDays");
- }
- /**
- * @return string
- */
- public function getClusterState()
- {
- return $this->get("clusterState");
- }
- /**
- * @return int
- */
- public function getClusterMaxRestart()
- {
- return $this->get("clusterMaxRestart");
- }
- /**
- * @return string
- */
- public function getClusterGroup()
- {
- return $this->get("clusterGroup");
- }
- /**
- * @return int
- */
- public function getClusterMaxRelocate()
- {
- return $this->get("clusterMaxRelocate");
- }
- /**
- * @return bool
- */
- public function isPermissionStart()
- {
- return $this->get("permissionStart") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionStop()
- {
- return $this->get("permissionStop") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionNovnc()
- {
- return $this->get("permissionNovnc") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionXtermjs()
- {
- return $this->get("permissionXtermjs") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionOsTemplate()
- {
- return $this->get("permissionOsTemplate") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionIsoImage()
- {
- return $this->get("permissionIsoImage") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionGraph()
- {
- return $this->get("permissionGraph") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionBackupJob()
- {
- return $this->get("permissionBackupJob") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionNetwork()
- {
- return $this->get("permissionNetwork") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionFirewall()
- {
- return $this->get("permissionFirewall") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionDisk()
- {
- return $this->get("permissionDisk") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionReboot()
- {
- return $this->get("permissionReboot") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionShutdown()
- {
- return $this->get("permissionShutdown") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionSpice()
- {
- return $this->get("permissionSpice") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionReinstall()
- {
- return $this->get("permissionReinstall") == "on";
- }
- /**
- * @return array
- */
- public function getPermissionOsTemplates()
- {
- return $this->get("permissionOsTemplates");
- }
- public function isPermissionOsTemplates()
- {
- return !empty($this->get("permissionOsTemplates"));
- }
- /**
- * @return bool
- */
- public function isPermissionBackup()
- {
- return $this->get("permissionBackup") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionTaskHistory()
- {
- return $this->get("permissionTaskHistory") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionSnapshot()
- {
- return $this->get("permissionSnapshot") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionFirewallOption()
- {
- return $this->get("permissionFirewallOption") == "on";
- }
- public function getNetworkModel()
- {
- return $this->get("networkModel");
- }
- public function getNetworkPrivateModel()
- {
- return $this->get("networkPrivateModel");
- }
- public function isCloudInit()
- {
- return $this->get("cloudInit") == "on";
- }
- /**
- * @return int
- */
- public function getAdditionalDiskMbpsRd()
- {
- return $this->get("additionalDiskMbps_rd");
- }
- /**
- * @return int
- */
- public function getAdditionalDiskIopsRd()
- {
- return $this->get("additionalDiskIops_rd");
- }
- /**
- * @return int
- */
- public function getAdditionalDiskIopsWr()
- {
- return $this->get("additionalDiskIops_wr");
- }
- /**
- * @return int
- */
- public function getAdditionalDiskMbpsWr()
- {
- return $this->get("additionalDiskMbps_wr");
- }
- /**
- * @return int
- */
- public function getAdditionalDiskIopsRdMax()
- {
- return $this->get("additionalDiskIops_rd_max");
- }
- /**
- * @return int
- */
- public function getAdditionalDiskIopsWrMax()
- {
- return $this->get("additionalDiskIops_wr_max");
- }
- /**
- * @return string
- */
- public function getAdditionalDiskStorage()
- {
- return $this->get("additionalDiskStorage");
- }
- /**
- * @return string
- */
- public function getAdditionalDiskFormat()
- {
- return $this->get("additionalDiskFormat");
- }
- /**
- * @return string
- */
- public function getAdditionalDiskCache()
- {
- return $this->get("additionalDiskCache");
- }
- /**
- * @return bool
- */
- public function isAdditionalDiskIoThread()
- {
- return $this->get("additionalDiskIoThread") == "on";
- }
- /**
- * @return string
- */
- public function getAdditionalDiskType()
- {
- return $this->get("additionalDiskType");
- }
- /**
- * @return bool
- */
- public function isAdditionalDiskReplicate()
- {
- return $this->get("additionalDiskReplicate") == "on";
- }
- /**
- * @return bool
- */
- public function isAdditionalDiskDiscard()
- {
- return $this->get("additionalDiskDiscard") == "on";
- }
- /**
- * @return bool
- */
- public function isPermissionAdditionalDiskBackup()
- {
- return $this->get("permissionAdditionalDiskBackup") == "on";
- }
- public function isPermissionMountPointBackup()
- {
- return $this->get("permissionMountPointBackup") == "on";
- }
- public function isMountPointReplicate()
- {
- return $this->get("mountPointReplicate") == "on";
- }
- public function isOsTemplatesInAllNodes()
- {
- return $this->get("osTemplatesInAllNodes") == "on";
- }
- public function getPermissionIsoImages()
- {
- return $this->get("permissionIsoImages");
- }
- public function isPermissionIsoImages()
- {
- return !empty($this->get("permissionIsoImages"));
- }
- public function getStorage()
- {
- return $this->get("storage");
- }
- /**
- * @return bool
- */
- public function isAgent()
- {
- return $this->get('agent') == "on";
- }
- /**
- * @return string
- */
- public function getCdrom()
- {
- return $this->get('cdrom');
- }
- /**
- * @return bool
- */
- public function isNuma()
- {
- return $this->get('numa') == "on";
- }
- /**
- * @return bool
- */
- public function isSpec()
- {
- return $this->get('spec') == "on";
- }
- /**
- * @return bool
- */
- public function isFreeze()
- {
- return $this->get('freeze') == "on";
- }
- /**
- * @return string
- */
- public function getKeyboard()
- {
- return $this->get('keyboard');
- }
- /**
- * @return string
- */
- public function getVga()
- {
- return $this->get('vga');
- }
- public function getVgaMemory()
- {
- return $this->get('vgaMemory');
- }
- /**
- * @return string
- */
- public function getClientNameForContainer()
- {
- return $this->get('clientNameForContainer');
- }
- /**
- * @return bool
- */
- public function isAcpi()
- {
- return $this->get('acpi') == "on";
- }
- /**
- * @return bool
- */
- public function isAutostart()
- {
- return $this->get('autostart') == "on";
- }
- /**
- * @return bool
- */
- public function isPcid()
- {
- return $this->get('pcid') == "on";
- }
- /**
- * @return bool
- */
- public function getHotplug()
- {
- return implode(",",$this->get('hotplug')) ;
- }
- /**
- * @return bool
- */
- public function isKvm()
- {
- return $this->get('kvm') == "on";
- }
- /**
- * @return bool
- */
- public function isReboot()
- {
- return $this->get('reboot') == "on";
- }
- /**
- * @return bool
- */
- public function isTablet()
- {
- return $this->get('tablet') == "on";
- }
- /**
- * @return string
- */
- public function getContainerPrefix()
- {
- return $this->get('containerPrefix');
- }
- /**
- * @return string
- */
- public function getCloneMode()
- {
- return $this->get('cloneMode');
- }
- /**
- * @return string
- */
- public function getBalloon()
- {
- return $this->get('balloon');
- }
- /**
- * @return string
- */
- public function getArgs()
- {
- return $this->get('args');
- }
- /**
- * @return string
- */
- public function getMigrateSpeed()
- {
- return $this->get('migrate_speed');
- }
- /**
- * @return string
- */
- public function getMigrateDowntime()
- {
- return $this->get('migrate_downtime');
- }
- /**
- * @return string
- */
- public function getStartdate()
- {
- return $this->get('startdate');
- }
- /**
- * @return string
- */
- public function getShares()
- {
- return $this->get('shares');
- }
- /**
- * @return bool
- */
- public function isLocaltime()
- {
- return $this->get('localtime') == "on";
- }
- /**
- * @return string
- */
- public function getWatchdog()
- {
- return $this->get('watchdog');
- }
- /**
- * @return string
- */
- public function getStartup()
- {
- return $this->get('startup');
- }
- /**
- * @return bool
- */
- public function isTdf()
- {
- return $this->get('tdf') == "on";
- }
- /**
- * @return string
- */
- public function getSockets()
- {
- return $this->get('sockets');
- }
- /**
- * @return string
- */
- public function getVcpus()
- {
- return $this->get('vcpus');
- }
- /**
- * @return string
- */
- public function getIsoImage()
- {
- return $this->get('isoImage');
- }
- public function getCdromType()
- {
- return $this->get('cdromType');
- }
- /**
- * @return string
- */
- public function getDiskStorage()
- {
- return $this->get('diskStorage');
- }
- /**
- * @return string
- */
- public function getDiskFormat()
- {
- return $this->get('diskFormat');
- }
- /**
- * @return string
- */
- public function getScsihw()
- {
- return $this->get('scsihw');
- }
- /**
- * @return string
- */
- public function getDiskType()
- {
- return $this->get('diskType');
- }
- /**
- * @return string
- */
- public function getDiskCache()
- {
- return $this->get('diskCache');
- }
- /**
- * @return bool
- */
- public function isDiscard()
- {
- return $this->get('discard') == "on";
- }
- /**
- * @return bool
- */
- public function isIoThread()
- {
- return $this->get('ioThread') == "on";
- }
- /**
- * @return string
- */
- public function getMbpsRd()
- {
- return $this->get('mbps_rd');
- }
- /**
- * @return string
- */
- public function getIopsRd()
- {
- return $this->get('iops_rd');
- }
- /**
- * @return string
- */
- public function getIopsWr()
- {
- return $this->get('iops_wr');
- }
- /**
- * @return string
- */
- public function getMbpsWr()
- {
- return $this->get('mbps_wr');
- }
- /**
- * @return string
- */
- public function getIopsRdMax()
- {
- return $this->get('iops_rd_max');
- }
- /**
- * @return string
- */
- public function getIopsWrMax()
- {
- return $this->get('iops_wr_max');
- }
- /**
- * @return bool
- */
- public function isEtworkOneDevice()
- {
- return $this->get('etworkOneDevice') == "on";
- }
- /**
- * @return string
- */
- public function getQueues()
- {
- return $this->get('queues');
- }
- /**
- * @return string
- */
- public function getBootDevice1()
- {
- return $this->get('bootDevice1');
- }
- /**
- * @return string
- */
- public function getBootDevice2()
- {
- return $this->get('bootDevice2');
- }
- /**
- * @return string
- */
- public function getBootDevice3()
- {
- return $this->get('bootDevice3');
- }
- /**
- * @return string
- */
- public function getBootdisk()
- {
- return $this->get('bootdisk');
- }
- /**
- * @return bool
- */
- public function isCloudInitServicePassword()
- {
- return $this->get('cloudInitServicePassword') == "on";
- }
- /**
- * @return bool
- */
- public function isCloudInitServiceUsername()
- {
- return $this->get('cloudInitServiceUsername') == "on";
- }
- /**
- * @return bool
- */
- public function isCloudInitServiceNameservers()
- {
- return $this->get('cloudInitServiceNameservers') == "on";
- }
- /**
- * @return string
- */
- public function getCiuser()
- {
- return $this->get('ciuser');
- }
- public function getSearchdomain()
- {
- return $this->get('searchdomain');
- }
- public function isRandomHostname()
- {
- return $this->get('randomHostname') == "on";
- }
- public function isUnprivileged()
- {
- return $this->get('unprivileged') == "on";
- }
- public function isIpsetIpFilter()
- {
- return $this->get("ipsetIpFilter") == "on";
- }
- public function getBootOrder()
- {
- $boot = [];
- if ($this->getBootDevice1())
- {
- $boot[] = $this->getBootDevice1();
- }
- if ($this->getBootDevice2())
- {
- $boot[] = $this->getBootDevice2();
- }
- if ($this->getBootDevice3())
- {
- $boot[] = $this->getBootDevice3();
- }
- return implode("", $boot);
- }
- public function isOneNetworkDevice()
- {
- return $this->get("oneNetworkDevice") == "on";
- }
- public function getCpu()
- {
- return $this->get("cpu");
- }
- public function getSuspensionAction()
- {
- return $this->get("suspensionAction");
- }
- public function isSuspendOnBandwidthOverage()
- {
- return $this->get("suspendOnBandwidthOverage") == "on";
- }
- public function isStart()
- {
- return $this->get("start") == "on";
- }
- /**
- * @return array
- */
- public function getTags()
- {
- return $this->get("tags");
- }
- public function getCicustom()
- {
- return $this->get('cicustom');
- }
- /**
- * @return bool
- */
- public function isPermissionSshkeys()
- {
- return $this->get("permissionSshkeys") == "on";
- }
- public function isPermissionSnapshotJob()
- {
- return $this->get("permissionSnapshotJob") == "on";
- }
- public function getPermissionSnapshotJobPeriod()
- {
- return $this->get("permissionSnapshotJobPeriod");
- }
- public function getSnapshotJobs()
- {
- return $this->get("snapshotJobs");
- }
- public function isAgentTemplateUser()
- {
- return $this->get('agentTemplateUser') == "on";
- }
- public function isAgentServicePassword()
- {
- return $this->get('agentServicePassword') == "on";
- }
- public function isAgentConfigureNetwork()
- {
- return $this->get('agentConfigureNetwork') == "on";
- }
- /**
- * @return bool
- */
- public function isCloneOnTheSameStorage()
- {
- return $this->get('cloneOnTheSameStorage') == "on";
- }
- public function isFeatureKeyctl()
- {
- return $this->get('featureKeyctl') == "on";
- }
- public function isFeatureNesting()
- {
- return $this->get('featureNesting') == "on";
- }
- public function isFeatureNfs()
- {
- return $this->get('featureNfs') == "on";
- }
- public function isFeatureCifs()
- {
- return $this->get('featureCifs') == "on";
- }
- public function isFeatureFuse()
- {
- return $this->get('featureFuse') == "on";
- }
- public function isFeatureMknod()
- {
- return $this->get('featureMknod') == "on";
- }
- public function hasCpuFlags(){
- $configFlags =['md-clear', "pcid", "spec-ctrl", "ssbd", "ibpb", "virt-ssbd",
- "amd-ssbd", "amd-no-ssb", "pdpe1gb", "hv-tlbflush","hv-evmcs", "aes" ];
- foreach ($configFlags as $configFlag) {
- if($this->get($configFlag)=="on"){
- return true;
- }
- }
- return false;
- }
- public function getCpuFlagsAsSource(){
- $configFlags =['md-clear', "pcid", "spec-ctrl", "ssbd", "ibpb", "virt-ssbd",
- "amd-ssbd", "amd-no-ssb", "pdpe1gb", "hv-tlbflush","hv-evmcs", "aes" ];
- $cpuFlags=[];
- foreach ($configFlags as $configFlag) {
- if($this->get($configFlag)=="on"){
- $cpuFlags[] = "+". $configFlag;
- }
- }
- return implode(";", $cpuFlags);
- }
- public function isSsd()
- {
- return $this->get('ssd') == "on";
- }
- public function isAdditionalDiskSsd()
- {
- return $this->get('additionalDiskSsd') == "on";
- }
- public function isPrivateNetwork()
- {
- return $this->get("privateNetwork") == "on";;
- }
- /**
- * @return array
- */
- public function getPermissionFirewalOptions()
- {
- return (array) $this->get("permissionFirewalOptions");
- }
- public function isFirewalOptionEnable()
- {
- return $this->get("firewalOptionEnable") == "on";
- }
- public function isFirewalOptionNdp()
- {
- return $this->get("firewalOptionNdp") == "on";
- }
- public function isFirewalOptionMacfilter()
- {
- return $this->get("firewalOptionMacfilter") == "on";
- }
- public function isFirewalOptionDhcp()
- {
- return $this->get("firewalOptionDhcp") == "on";
- }
- public function isFirewalOptionRadv()
- {
- return $this->get("firewalOptionRadv") == "on";
- }
- public function isFirewalOptionIpfilter()
- {
- return $this->get("firewalOptionIpfilter") == "on";
- }
- public function getBwLimit(){
- return $this->get('bwlimit');
- }
- public function getBios(){
- return $this->get('bios');
- }
- public function isAdditionalDisk(){
- return $this->get('additionalDisk')=='on';
- }
- public function isMountPoint(){
- return $this->get('mountPoint')=='on';
- }
- public function getCloudInitScript(){
- return $this->get('cloudInitScript');
- }
- public function getMachine(){
- return $this->get('machine');
- }
- public function getMinimumVmid(){
- return $this->get('minimumVmid');
- }
- /**
- * @return array|null
- */
- public function getServerGroup(){
- return $this->get('serverGroup');
- }
- public function __get($name)
- {
- return $this->get($name);
- }
- public function hasPermissionInformation($key){
- $permissionInformation = $this->permissionInformation;
- return empty($this->permissionInformation) || in_array($key, $this->permissionInformation);
- }
- public function isLoadBalancerMigrationWithLocalDisks()
- {
- return $this->get("loadBalancerMigrationWithLocalDisks") == "on";
- }
- public function hasPermissionChangeHostname()
- {
- return $this->get("permissionChangeHostname") != "off";
- }
- public function getPermissionBackupCompress()
- {
- return (array) $this->get("permissionBackupCompress");
- }
- }
|