diff options
Diffstat (limited to 'inc/property.inc.php')
-rw-r--r-- | inc/property.inc.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/inc/property.inc.php b/inc/property.inc.php index d62bbcb9..00c8018f 100644 --- a/inc/property.inc.php +++ b/inc/property.inc.php @@ -133,6 +133,19 @@ class Property { return json_decode(self::get('vmstore-config'), true); } + public static function getVmStoreUrl() + { + $store = self::getVmStoreConfig(); + if (!isset($store['storetype'])) + return false; + if ($store['storetype'] === 'nfs') + return $store['nfsaddr']; + if ($store['storetype'] === 'cifs') + return $store['cifsaddr']; + if ($store['storetype'] === 'internal') + return '<local>'; + return '<unknown>'; + } public static function setVmStoreConfig($value) { |