Skip to content

Commit e910af1

Browse files
committed
Merge pull request #587 from carolynvs/volume-snapshots
Support Compute Volumes and Volume Snapshots
2 parents dba436d + 8ca2e36 commit e910af1

51 files changed

Lines changed: 2338 additions & 907 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/corelib/ApiHelper.cs

Lines changed: 0 additions & 113 deletions
This file was deleted.

src/corelib/Authentication/ServiceUrlBuilder.cs

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using OpenStack.Serialization;
2+
3+
namespace OpenStack.BlockStorage.v2.Serialization
4+
{
5+
/// <summary />
6+
/// <exclude />
7+
public class SnapshotStatus<T> : ResourceStatus
8+
where T : SnapshotStatus<T>, new()
9+
{
10+
/// <summary>
11+
/// The snapshot is being created.
12+
/// </summary>
13+
public static readonly T Creating = new T {DisplayName = "creating"};
14+
15+
/// <summary>
16+
/// The snapshot is ready to use.
17+
/// </summary>
18+
public static readonly T Available = new T {DisplayName = "available"};
19+
20+
/// <summary>
21+
/// The snapshot is being deleted.
22+
/// </summary>
23+
public static readonly T Deleting = new T {DisplayName = "deleting"};
24+
25+
/// <summary>
26+
/// A snapshot creation error occurred.
27+
/// </summary>
28+
public static readonly T Error = new T {DisplayName = "error", IsError = true};
29+
30+
/// <summary>
31+
/// A snapshot deletion error occurred.
32+
/// </summary>
33+
public static readonly T ErrorDeleting = new T {DisplayName = "error_deleting", IsError = true};
34+
}
35+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
using OpenStack.Serialization;
2+
3+
namespace OpenStack.BlockStorage.v2.Serialization
4+
{
5+
/// <summary />
6+
/// <exclude />
7+
public class VolumeStatus<T> : ResourceStatus
8+
where T : VolumeStatus<T>, new()
9+
{
10+
/// <summary>
11+
/// The volume is being created.
12+
/// </summary>
13+
public static readonly T Creating = new T {DisplayName = "creating"};
14+
15+
/// <summary>
16+
/// The volume is ready to attach to an instance.
17+
/// </summary>
18+
public static readonly T Available = new T {DisplayName = "available"};
19+
20+
/// <summary>
21+
/// The volume is attaching to an instance.
22+
/// </summary>
23+
public static readonly T Attaching = new T {DisplayName = "attaching"};
24+
25+
/// <summary>
26+
/// The volume is attached to an instance.
27+
/// </summary>
28+
public static readonly T InUse = new T {DisplayName = "in-use"};
29+
30+
/// <summary>
31+
/// The volume is being deleted.
32+
/// </summary>
33+
public static readonly T Deleting = new T {DisplayName = "deleting"};
34+
35+
/// <summary>
36+
/// A volume creation error occurred.
37+
/// </summary>
38+
public static readonly T Error = new T {DisplayName = "error", IsError = true};
39+
40+
/// <summary>
41+
/// A volume deletion error occurred.
42+
/// </summary>
43+
public static readonly T ErrorDeleting = new T {DisplayName = "error_deleting", IsError = true};
44+
45+
/// <summary>
46+
/// A backup restoration error occurred.
47+
/// </summary>
48+
public static readonly T ErrorRestoring = new T {DisplayName = "error_restoring", IsError = true};
49+
50+
/// <summary>
51+
/// An error occurred while attempting to extend a volume.
52+
/// </summary>
53+
public static readonly T ErrorExtending = new T {DisplayName = "error_extending", IsError = true};
54+
55+
/// <summary>
56+
/// The volume is being backed up.
57+
/// </summary>
58+
public static readonly T BackingUp = new T {DisplayName = "backing-up"};
59+
60+
/// <summary>
61+
/// A backup is being restored to the volume.
62+
/// </summary>
63+
public static readonly T RestoringBackup = new T {DisplayName = "restoring-backup"};
64+
}
65+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace OpenStack.BlockStorage.v2
2+
{
3+
/// <summary/>
4+
public class SnapshotStatus : Serialization.SnapshotStatus<SnapshotStatus>
5+
{
6+
}
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace OpenStack.BlockStorage.v2
2+
{
3+
/// <summary/>
4+
public class VolumeStatus : Serialization.VolumeStatus<VolumeStatus>
5+
{
6+
}
7+
}

0 commit comments

Comments
 (0)