| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566 |
- <?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
- */
- 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") == "on";
- }
- 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');
- }
- }
|