internal static string ToSerializedValue(this DiskStatus value)
        {
            switch (value)
            {
            case DiskStatus.Online:
                return("Online");

            case DiskStatus.Offline:
                return("Offline");
            }
            return(null);
        }
Beispiel #2
0
 public DiskStatus GetDiskStatus()
 {
     lock (Daq) {
         BasicTypeSerializer.Put(SendContext, (byte)NwazetDAQ.Command.FileSystem);
         BasicTypeSerializer.Put(SendContext, (byte)Command.GetDiskStatus);
         Daq.Execute();
         Daq.Receive();
         CheckResult();
         DiskStatus diskResult = (DiskStatus)BasicTypeDeSerializer.Get(ReceiveContext);
         return(diskResult);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the ISCSIDisk class.
 /// </summary>
 /// <param name="diskStatus">The disk status. Possible values include:
 /// 'Online', 'Offline'</param>
 /// <param name="accessControlRecords">The access control
 /// records.</param>
 /// <param name="dataPolicy">The data policy. Possible values include:
 /// 'Invalid', 'Local', 'Tiered', 'Cloud'</param>
 /// <param name="provisionedCapacityInBytes">The provisioned capacity
 /// in bytes.</param>
 /// <param name="monitoringStatus">The monitoring. Possible values
 /// include: 'Enabled', 'Disabled'</param>
 /// <param name="id">The identifier.</param>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 /// <param name="description">The description.</param>
 /// <param name="usedCapacityInBytes">The used capacity in
 /// bytes.</param>
 /// <param name="localUsedCapacityInBytes">The local used capacity in
 /// bytes.</param>
 public ISCSIDisk(DiskStatus diskStatus, IList <string> accessControlRecords, DataPolicy dataPolicy, long provisionedCapacityInBytes, MonitoringStatus monitoringStatus, string id = default(string), string name = default(string), string type = default(string), string description = default(string), long?usedCapacityInBytes = default(long?), long?localUsedCapacityInBytes = default(long?))
     : base(id, name, type)
 {
     Description                = description;
     DiskStatus                 = diskStatus;
     AccessControlRecords       = accessControlRecords;
     DataPolicy                 = dataPolicy;
     ProvisionedCapacityInBytes = provisionedCapacityInBytes;
     UsedCapacityInBytes        = usedCapacityInBytes;
     LocalUsedCapacityInBytes   = localUsedCapacityInBytes;
     MonitoringStatus           = monitoringStatus;
     CustomInit();
 }