Пример #1
0
        internal StorageInfo(PveClient client, object apiData, StorageTypeEnum type) : base(client, apiData)
        {
            Type = type;
            DynamicHelper.CheckKeyOrCreate(apiData, "disable", "0");

            DynamicHelper.CheckKeyOrCreate(apiData, "nodes", "All");
            Nodes = ApiData.nodes.Split(',');
        }
Пример #2
0
        internal Snapshot(VMInfo vm, object apiData)
        {
            _apiData = apiData;
            VM       = vm;

            DynamicHelper.CheckKeyOrCreate(_apiData, "description", "no-description");
            DynamicHelper.CheckKeyOrCreate(_apiData, "parent", "no-parent");
            DynamicHelper.CheckKeyOrCreate(_apiData, "snaptime");
            DynamicHelper.CheckKeyOrCreate(_apiData, "vmstate", 0);

            Date = _apiData.snaptime == null
                        ? DateTime.Now
                        : DateTimeOffset.FromUnixTimeSeconds(_apiData.snaptime).DateTime;
        }
Пример #3
0
 internal Config(VMInfo vm, object apiData)
 {
     ApiData = apiData;
     VM      = vm;
     DynamicHelper.CheckKeyOrCreate(apiData, "lock", "");
 }
Пример #4
0
 internal StorageInfo(PveClient client, object apiData, StorageTypeEnum type) : base(client, apiData)
 {
     Type = type;
     DynamicHelper.CheckKeyOrCreate(apiData, "disable", "0");
 }
Пример #5
0
 internal Rbd(PveClient client, object apiData) : base(client, apiData, StorageTypeEnum.Rbd)
 {
     DynamicHelper.CheckKeyOrCreate(apiData, "monhost", "");
 }