Skip to content

Commit 821c1c3

Browse files
committed
Add inline doc to Compute Api
1 parent 1c2c742 commit 821c1c3

18 files changed

Lines changed: 243 additions & 104 deletions

src/corelib/Compute/v2_1/FlavorReference.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
namespace OpenStack.Compute.v2_1
1111
{
12-
/// <summary />
12+
/// <summary>
13+
/// Reference to a flavor resource.
14+
/// </summary>
1315
public class FlavorReference : IHaveExtraData, IServiceResource
1416
{
1517
/// <summary>
@@ -18,7 +20,6 @@ public class FlavorReference : IHaveExtraData, IServiceResource
1820
[JsonProperty("id")]
1921
public Identifier Id { get; set; }
2022

21-
/// <summary />
2223
[JsonExtensionData]
2324
IDictionary<string, JToken> IHaveExtraData.Data { get; set; } = new Dictionary<string, JToken>();
2425

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace OpenStack.Compute.v2_1
2+
{
3+
using System.Runtime.CompilerServices;
4+
5+
/// <summary>
6+
/// The <see cref="OpenStack.Compute.v2_1"/> namespace defines provider-independent
7+
/// interfaces and implementations for the OpenStack Compute v2.1 API.
8+
/// </summary>
9+
[CompilerGenerated]
10+
internal class NamespaceDoc
11+
{
12+
}
13+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System.Runtime.CompilerServices;
2+
3+
namespace OpenStack.Compute.v2_1.Operator
4+
{
5+
/// <summary>
6+
/// The <see cref="Operator"/> namespace defines additional functionality that is restricted to cloud operators only.
7+
/// </summary>
8+
[CompilerGenerated]
9+
internal class NamespaceDoc
10+
{
11+
}
12+
}

src/corelib/Compute/v2_1/Serialization/AddressType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace OpenStack.Compute.v2_1.Serialization
44
{
55
/// <summary>
6-
/// Server address type.
6+
/// Server address types.
77
/// </summary>
88
/// <exclude />
99
public class AddressType<T> : StringEnumeration

src/corelib/Compute/v2_1/Serialization/ImageType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace OpenStack.Compute.v2_1.Serialization
44
{
55
/// <summary>
6-
/// The server image type
6+
/// Server image types.
77
/// </summary>
88
/// <exclude />
99
public class ImageType<T> : StringEnumeration

src/corelib/Compute/v2_1/ServerBlockDeviceMapping.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace OpenStack.Compute.v2_1
44
{
55
/// <summary>
6-
/// Enables you to boot a server from a volume when you specify additional parameters.
6+
/// Defines how to boot a server from a volume.
77
/// </summary>
88
/// <remarks>
99
/// If you specify the volume status, you must set it to available. In the OpenStack Block Storage database, the volume attach_status must be detached.
@@ -17,7 +17,7 @@ public class ServerBlockDeviceMapping
1717
public int BootIndex { get; set; }
1818

1919
/// <summary>
20-
/// Defines the order in which a hypervisor tries devices when it attempts to boot the guest from storage.
20+
/// A path to the device for the volume that you want to use to boot the server.
2121
/// </summary>
2222
[JsonProperty("device_name")]
2323
public string DeviceName { get; set; }

src/corelib/Compute/v2_1/ServerVolume.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,23 @@
33

44
namespace OpenStack.Compute.v2_1
55
{
6-
/// <summary />
6+
/// <summary>
7+
/// Represents a volume attached to a server.
8+
/// </summary>
79
[JsonConverterWithConstructor(typeof(RootWrapperConverter), "volumeAttachment")]
810
public class ServerVolume : ServerVolumeReference
911
{
1012
private Identifier _serverId;
1113

12-
/// <summary />
14+
/// <summary>
15+
/// A path to the device for the volume attached to the server.
16+
/// </summary>
1317
[JsonProperty("device")]
1418
public string DeviceName { get; set; }
1519

16-
/// <summary />
20+
/// <summary>
21+
/// The server identifier.
22+
/// </summary>
1723
[JsonProperty("serverId")]
1824
public Identifier ServerId
1925
{
@@ -25,7 +31,9 @@ public Identifier ServerId
2531
}
2632
}
2733

28-
/// <summary />
34+
/// <summary>
35+
/// The volume identifier.
36+
/// </summary>
2937
[JsonProperty("volumeId")]
3038
public Identifier VolumeId { get; set; }
3139
}

src/corelib/Compute/v2_1/ServerVolumeDefinition.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,26 @@
33

44
namespace OpenStack.Compute.v2_1
55
{
6-
/// <summary />
6+
/// <summary>
7+
/// Defines how to attach a volume to a server.
8+
/// </summary>
79
[JsonConverterWithConstructor(typeof(RootWrapperConverter), "volumeAttachment")]
810
public class ServerVolumeDefinition
911
{
10-
/// <summary />
12+
/// <summary>
13+
/// Initializes a new instance of the <see cref="ServerVolumeDefinition"/> class.
14+
/// </summary>
15+
/// <param name="volumeId">The volume identifier.</param>
1116
public ServerVolumeDefinition(Identifier volumeId)
1217
{
1318
VolumeId = volumeId;
1419
}
1520

16-
/// <summary />
21+
/// <inheritdoc cref="ServerVolume.DeviceName" />
1722
[JsonProperty("device")]
1823
public string DeviceName { get; set; }
1924

20-
/// <summary />
25+
/// <inheritdoc cref="ServerVolume.VolumeId" />
2126
[JsonProperty("volumeId")]
2227
public Identifier VolumeId { get; set; }
2328
}

src/corelib/Compute/v2_1/ServerVolumeExtensions.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33

44
namespace OpenStack.Synchronous
55
{
6-
/// <summary />
6+
/// <summary>
7+
/// Provides synchronous extention methods for a <see cref="ServerVolume"/> instance.
8+
/// </summary>
79
public static class ServerVolumeExtensions
810
{
9-
/// <summary />
11+
/// <inheritdoc cref="ServerVolumeReference.GetServerVolumeAsync" />
1012
public static ServerVolume GetServerVolume(this ServerVolumeReference volume)
1113
{
1214
return volume.GetServerVolumeAsync().ForceSynchronous();
1315
}
1416

15-
/// <summary />
17+
/// <inheritdoc cref="ServerVolumeReference.DetachAsync" />
1618
public static void Detach(this ServerVolumeReference volume)
1719
{
1820
volume.DetachAsync().ForceSynchronous();

src/corelib/Compute/v2_1/ServerVolumeReference.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,20 @@
1111

1212
namespace OpenStack.Compute.v2_1
1313
{
14-
/// <summary />
14+
/// <summary>
15+
/// Reference to a volume attachment to a server.
16+
/// </summary>
1517
public class ServerVolumeReference : IHaveExtraData, IChildResource
1618
{
17-
/// <summary />
19+
/// <summary>
20+
/// The associated server.
21+
/// </summary>
1822
[JsonIgnore]
1923
protected ServerReference ServerRef { get; set; }
2024

21-
/// <summary />
25+
/// <summary>
26+
/// The attachment identifier.
27+
/// </summary>
2228
public Identifier Id { get; set; }
2329

2430
object IServiceResource.Owner { get; set; }
@@ -39,7 +45,6 @@ void IChildResource.SetParent(string parentId)
3945
SetParent(new ServerReference {Id = parentId});
4046
}
4147

42-
/// <summary />
4348
[JsonExtensionData]
4449
IDictionary<string, JToken> IHaveExtraData.Data { get; set; } = new Dictionary<string, JToken>();
4550

@@ -52,7 +57,7 @@ protected void AssertParentIsSet([CallerMemberName]string callerName = "")
5257
throw new InvalidOperationException(string.Format($"{callerName} can only be used on instances which were constructed by the ComputeService. Use ComputeService.{callerName} instead."));
5358
}
5459

55-
/// <summary />
60+
/// <inheritdoc cref="ComputeApi.GetServerVolumeAsync{T}" />
5661
/// <exception cref="InvalidOperationException">When this instance was not constructed by the <see cref="ComputeService"/>, as it is missing the appropriate internal state to execute service calls.</exception>
5762
public async Task<ServerVolume> GetServerVolumeAsync(CancellationToken cancellationToken = default(CancellationToken))
5863
{
@@ -64,7 +69,7 @@ protected void AssertParentIsSet([CallerMemberName]string callerName = "")
6469
return result;
6570
}
6671

67-
/// <summary />
72+
/// <inheritdoc cref="ComputeApi.DetachVolumeAsync" />
6873
/// <exception cref="InvalidOperationException">When this instance was not constructed by the <see cref="ComputeService"/>, as it is missing the appropriate internal state to execute service calls.</exception>
6974
public async Task DetachAsync(CancellationToken cancellationToken = default(CancellationToken))
7075
{

0 commit comments

Comments
 (0)