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(','); }
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; }
internal Config(VMInfo vm, object apiData) { ApiData = apiData; VM = vm; DynamicHelper.CheckKeyOrCreate(apiData, "lock", ""); }
internal StorageInfo(PveClient client, object apiData, StorageTypeEnum type) : base(client, apiData) { Type = type; DynamicHelper.CheckKeyOrCreate(apiData, "disable", "0"); }
internal Rbd(PveClient client, object apiData) : base(client, apiData, StorageTypeEnum.Rbd) { DynamicHelper.CheckKeyOrCreate(apiData, "monhost", ""); }