Skip to content

Commit 8014298

Browse files
committed
Rename VolumeType to ServerBlockDeviceType
VolumeType means something else, and really this is only for defining block device mapping
1 parent 759d791 commit 8014298

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/corelib/Compute/v2_1/Serialization/VolumeType.cs renamed to src/corelib/Compute/v2_1/Serialization/ServerBlockDeviceType.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ namespace OpenStack.Compute.v2_1.Serialization
44
{
55
/// <summary />
66
/// <exclude />
7-
public class VolumeType<T> : StringEnumeration
8-
where T : VolumeType<T>, new()
7+
public class ServerBlockDeviceType<T> : StringEnumeration
8+
where T : ServerBlockDeviceType<T>, new()
99
{
1010
/// <summary />
1111
public static readonly T Blank = new T{DisplayName = "blank"};

src/corelib/Compute/v2_1/ServerBlockDeviceMapping.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ public class ServerBlockDeviceMapping
2424

2525
/// <summary />
2626
[JsonProperty("source_type")]
27-
public VolumeType SourceType { get; set; }
27+
public ServerBlockDeviceType SourceType { get; set; }
2828

2929
/// <summary />
3030
[JsonProperty("destination_type")]
31-
public VolumeType DestinationType { get; set; }
31+
public ServerBlockDeviceType DestinationType { get; set; }
3232

3333
/// <summary /> // in GB
3434
[JsonProperty("volume_size")]

src/corelib/Compute/v2_1/VolumeType.cs renamed to src/corelib/Compute/v2_1/ServerBlockDeviceType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
namespace OpenStack.Compute.v2_1
44
{
55
/// <summary />
6-
public class VolumeType : VolumeType<VolumeType>
6+
public class ServerBlockDeviceType : ServerBlockDeviceType<ServerBlockDeviceType>
77
{ }
88
}

src/corelib/Compute/v2_1/ServerCreateDefinition.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void ConfigureBootFromVolume(Identifier volumeId, bool deleteVolumeWithSe
9393
{
9494
BlockDeviceMapping.Add(new ServerBlockDeviceMapping
9595
{
96-
SourceType = VolumeType.Volume,
96+
SourceType = ServerBlockDeviceType.Volume,
9797
SourceId = volumeId,
9898
BootIndex = 0,
9999
DeleteWithServer = deleteVolumeWithServer
@@ -110,10 +110,10 @@ public void ConfigureBootFromNewVolume(Identifier volumeId, int volumeSize, bool
110110
{
111111
BlockDeviceMapping.Add(new ServerBlockDeviceMapping
112112
{
113-
SourceType = VolumeType.Volume,
113+
SourceType = ServerBlockDeviceType.Volume,
114114
SourceId = volumeId,
115115
BootIndex = 0,
116-
DestinationType = VolumeType.Volume,
116+
DestinationType = ServerBlockDeviceType.Volume,
117117
DestinationVolumeSize = volumeSize,
118118
DeleteWithServer = deleteVolumeWithServer
119119
});
@@ -128,10 +128,10 @@ public void ConfigureBootFromNewVolume(int volumeSize, bool deleteVolumeWithServ
128128
{
129129
BlockDeviceMapping.Add(new ServerBlockDeviceMapping
130130
{
131-
SourceType = VolumeType.Image,
131+
SourceType = ServerBlockDeviceType.Image,
132132
SourceId = ImageId,
133133
BootIndex = 0,
134-
DestinationType = VolumeType.Volume,
134+
DestinationType = ServerBlockDeviceType.Volume,
135135
DestinationVolumeSize = volumeSize,
136136
DeleteWithServer = deleteVolumeWithServer
137137
});

src/corelib/OpenStack.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
<Compile Include="Compute\v2_1\Serialization\ServerAddressCollection.cs" />
140140
<Compile Include="Compute\v2_1\Serialization\ImageCollection.cs" />
141141
<Compile Include="Compute\v2_1\Serialization\FlavorCollection.cs" />
142-
<Compile Include="Compute\v2_1\Serialization\VolumeType.cs" />
142+
<Compile Include="Compute\v2_1\Serialization\ServerBlockDeviceType.cs" />
143143
<Compile Include="Compute\v2_1\ServerAction.cs" />
144144
<Compile Include="Compute\v2_1\ServerActionExtensions.cs" />
145145
<Compile Include="Compute\v2_1\ServerBlockDeviceMapping.cs" />
@@ -164,7 +164,7 @@
164164
<Compile Include="Compute\v2_1\ServerVolumeExtensions.cs" />
165165
<Compile Include="Compute\v2_1\VolumeDefinition.cs" />
166166
<Compile Include="Compute\v2_1\Volume.cs" />
167-
<Compile Include="Compute\v2_1\VolumeType.cs" />
167+
<Compile Include="Compute\v2_1\ServerBlockDeviceType.cs" />
168168
<Compile Include="Compute\v2_1\ServerVolumeReference.cs" />
169169
<Compile Include="Compute\v2_2\KeyPair.cs" />
170170
<Compile Include="Compute\v2_2\KeyPairDefinition.cs" />

0 commit comments

Comments
 (0)