示例#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", "");
 }