Skip to content

Commit b09d970

Browse files
committed
Add inline doc to Compute Api
1 parent 1b142b0 commit b09d970

21 files changed

Lines changed: 189 additions & 63 deletions

src/corelib/Compute/v2_1/ComputeService.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,22 @@ public ComputeService(IAuthenticationProvider authenticationProvider, string reg
360360
return _computeApi.GetKeyPairAsync<KeyPair>(keypairName, cancellationToken);
361361
}
362362

363-
/// <inheritdoc cref="ComputeApi.CreateKeyPairAsync{T}" />
363+
/// <summary>
364+
/// Creates a new key pair.
365+
/// </summary>
366+
/// <param name="request">The key pair request.</param>
367+
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
368+
/// <returns>The response includes the generated private key.</returns>
364369
public virtual Task<KeyPairResponse> CreateKeyPairAsync(KeyPairRequest request, CancellationToken cancellationToken = default(CancellationToken))
365370
{
366371
return _computeApi.CreateKeyPairAsync<KeyPairResponse>(request, cancellationToken);
367372
}
368373

369-
/// <summary />
374+
/// <summary>
375+
/// Imports a key pair.
376+
/// </summary>
377+
/// <param name="keypair">The keypair.</param>
378+
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
370379
public virtual Task<KeyPairSummary> ImportKeyPairAsync(KeyPairDefinition keypair, CancellationToken cancellationToken = default(CancellationToken))
371380
{
372381
return _computeApi.CreateKeyPairAsync<KeyPairSummary>(keypair, cancellationToken);
@@ -378,7 +387,7 @@ public ComputeService(IAuthenticationProvider authenticationProvider, string reg
378387
return await _computeApi.ListKeyPairsAsync<KeyPairSummaryCollection>(cancellationToken).ConfigureAwait(false);
379388
}
380389

381-
/// <summary />
390+
/// <inheritdoc cref="ComputeApi.DeleteKeyPairAsync"/>
382391
public virtual Task DeleteKeyPairAsync(string keypairName, CancellationToken cancellationToken = default(CancellationToken))
383392
{
384393
return _computeApi.DeleteKeyPairAsync(keypairName, cancellationToken);

src/corelib/Compute/v2_1/DiskConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace OpenStack.Compute.v2_1
44
{
5-
/// <summary />
5+
/// <inheritdoc />
66
public class DiskConfiguration : DiskConfiguration<DiskConfiguration>
77
{ }
88
}

src/corelib/Compute/v2_1/Flavor.cs

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,46 @@
33

44
namespace OpenStack.Compute.v2_1
55
{
6-
/// <summary />
6+
/// <summary>
7+
/// Represents a resource configuration for a server.
8+
/// <para>Each flavor is a unique combination of disk space, memory capacity, vCPUs, and network bandwidth.</para>
9+
/// </summary>
710
[JsonConverterWithConstructor(typeof(RootWrapperConverter), "flavor")]
811
public class Flavor : FlavorSummary
912
{
10-
/// <summary />
13+
/// <summary>
14+
/// The disk size.
15+
/// </summary>
1116
[JsonProperty("disk")]
1217
public int DiskSize { get; set; }
1318

14-
/// <summary />
19+
/// <summary>
20+
/// The amount of RAM.
21+
/// </summary>
1522
[JsonProperty("ram")]
1623
public int MemorySize { get; set; }
1724

18-
/// <summary />
25+
/// <summary>
26+
/// The amount of swap space.
27+
/// </summary>
1928
[JsonProperty("swap")]
2029
public int? SwapSize { get; set; }
2130

22-
/// <summary />
31+
/// <summary>
32+
/// The number of virtual CPUs.
33+
/// </summary>
2334
[JsonProperty("vcpus")]
2435
public int VirtualCPUs { get; set; }
2536

26-
/// <summary />
37+
/// <summary>
38+
/// The rxtx factor, which describes configured bandwidth cap values.
39+
/// </summary>
2740
[JsonProperty("rxtx_factor")]
2841
public double? BandwidthCap { get; set; }
2942

30-
/// <summary />
43+
/// <summary>
44+
/// The number of ephemeral disks.
45+
/// </summary>
3146
[JsonProperty("OS-FLV-EXT-DATA:ephemeral")]
3247
public int? EphemeralDiskSize { get; set; }
3348
}

src/corelib/Compute/v2_1/FlavorReference.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ namespace OpenStack.Compute.v2_1
1212
/// <summary />
1313
public class FlavorReference : IHaveExtraData, IServiceResource
1414
{
15-
/// <summary />
15+
/// <summary>
16+
/// The flavor identifier.
17+
/// </summary>
1618
[JsonProperty("id")]
1719
public Identifier Id { get; set; }
1820

src/corelib/Compute/v2_1/FlavorSummary.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ namespace OpenStack.Compute.v2_1
55
/// <summary />
66
public class FlavorSummary : FlavorReference
77
{
8-
/// <summary /> // In some cases, only the id is populated. Use GetFlavor if Name is null.
8+
/// <summary>
9+
/// The flavor name.
10+
/// </summary>
911
[JsonProperty("name")]
1012
public string Name { get; set; }
1113
}

src/corelib/Compute/v2_1/IPProtocol.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace OpenStack.Compute.v2_1
44
{
5-
/// <summary />
5+
/// <summary>
6+
/// Internet Protocols.
7+
/// </summary>
68
public class IPProtocol : StringEnumeration
79
{
810
/// <summary />

src/corelib/Compute/v2_1/Image.cs

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
namespace OpenStack.Compute.v2_1
1212
{
13-
/// <summary />
13+
/// <summary>
14+
/// A collection of files for a specific operating system (OS) that you use to create or rebuild a server.
15+
/// </summary>
1416
[JsonConverterWithConstructor(typeof(RootWrapperConverter), "image")]
1517
public class Image : ImageSummary
1618
{
@@ -22,43 +24,63 @@ public Image()
2224
Metadata = new ImageMetadata();
2325
}
2426

25-
/// <summary />
27+
/// <summary>
28+
/// The date and time when the resource was created.
29+
/// </summary>
2630
[JsonProperty("created")]
2731
public DateTimeOffset Created { get; set; }
2832

29-
/// <summary />
33+
/// <summary>
34+
/// The date and time when the resource was updated.
35+
/// </summary>
3036
[JsonProperty("updated")]
3137
public DateTimeOffset Updated { get; set; }
3238

33-
/// <summary />
39+
/// <summary>
40+
/// The minimum disk size in GB that is required to boot the image.
41+
/// </summary>
3442
[JsonProperty("minDisk")]
3543
public int MinimumDiskSize { get; set; }
3644

37-
/// <summary />
45+
/// <summary>
46+
/// The minimum amount of RAM in MB that is required to boot the image.
47+
/// </summary>
3848
[JsonProperty("minRam")]
3949
public int MinimumMemorySize { get; set; }
4050

41-
/// <summary />
51+
/// <summary>
52+
/// The size of the image data, in bytes.
53+
/// </summary>
4254
[JsonProperty("OS-EXT-IMG-SIZE:size")]
4355
public int? Size { get; set; }
4456

45-
/// <summary />
57+
/// <summary>
58+
/// The build completion progress, as a percentage.
59+
/// </summary>
4660
[JsonProperty("progress")]
4761
public int Progress { get; set; }
4862

49-
/// <summary />
63+
/// <summary>
64+
/// The image status.
65+
/// </summary>
5066
[JsonProperty("status")]
5167
public ImageStatus Status { get; set; }
5268

53-
/// <summary />
69+
/// <summary>
70+
/// The associated server.
71+
/// </summary>
5472
[JsonProperty("server")]
5573
public ServerReference Server { get; set; }
5674

57-
/// <summary />
75+
/// <summary>
76+
/// Metadata key pairs containing information about the image.
77+
/// </summary>
5878
[JsonProperty("metadata")]
5979
public ImageMetadata Metadata { get; set; }
6080

61-
/// <summary />
81+
/// <summary>
82+
/// Indicates whether the image is built-in (base) or custom (snapshot).
83+
/// </summary>
6284
[JsonIgnore]
6385
public ImageType Type
6486
{
@@ -81,6 +103,9 @@ public ImageType Type
81103
result.CopyProperties(this);
82104
}
83105

106+
/// <summary>
107+
/// Wait until the image is active.
108+
/// </summary>
84109
/// <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>
85110
public Task WaitUntilActiveAsync(TimeSpan? refreshDelay = null, TimeSpan? timeout = null, IProgress<bool> progress = null, CancellationToken cancellationToken = default(CancellationToken))
86111
{

src/corelib/Compute/v2_1/ImageListOptions.cs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,39 @@
33

44
namespace OpenStack.Compute.v2_1
55
{
6-
/// <summary />
6+
/// <summary>
7+
/// Optional filter and paging options when listing images.
8+
/// </summary>
79
public class ImageListOptions : PageOptions
810
{
9-
/// <summary />
11+
/// <summary>
12+
/// Filters the list of images to those that have changed since the specified date.
13+
/// </summary>
1014
public DateTimeOffset? UpdatedAfter { get; set; }
1115

12-
/// <summary />
16+
/// <summary>
17+
/// Filters the list of images by server.
18+
/// </summary>
1319
public Identifier ServerId { get; set; }
1420

15-
/// <summary />
21+
/// <summary>
22+
/// Filters the list of images by image name.
23+
/// </summary>
1624
public string Name { get; set; }
1725

18-
/// <summary />
26+
/// <summary>
27+
/// The minimum disk size required to create a server with the image.
28+
/// </summary>
1929
public int? MininumDiskSize { get; set; }
2030

21-
/// <summary />
31+
/// <summary>
32+
/// The minimum amount of RAM required to create a server with the image.
33+
/// </summary>
2234
public int? MininumMemorySize { get; set; }
2335

24-
/// <summary />
36+
/// <summary>
37+
/// Filters by base images or custom server images that you have created.
38+
/// </summary>
2539
public ImageType Type { get; set; }
2640

2741
/// <summary />

src/corelib/Compute/v2_1/ImageMetadata.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@
1010

1111
namespace OpenStack.Compute.v2_1
1212
{
13-
/// <summary />
13+
/// <summary>
14+
/// Metadata key pairs containing information about the image.
15+
/// </summary>
1416
[JsonConverterWithConstructor(typeof (RootWrapperConverter), "metadata")]
1517
public class ImageMetadata : Dictionary<string, string>, IHaveExtraData, IChildResource
1618
{
17-
/// <summary />
19+
/// <summary>
20+
/// The associated image.
21+
/// </summary>
1822
[JsonIgnore]
1923
protected ImageReference Image { get; set; }
2024

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

52-
/// <summary />
56+
/// <inheritdoc cref="ComputeApi.CreateImageMetadataAsync" />
5357
public async Task CreateAsync(string key, string value, CancellationToken cancellationToken = default(CancellationToken))
5458
{
5559
AssertParentIsSet();
@@ -58,7 +62,7 @@ protected void AssertParentIsSet([CallerMemberName]string callerName = "")
5862
this[key] = value;
5963
}
6064

61-
/// <summary />
65+
/// <inheritdoc cref="ComputeApi.UpdateImageMetadataAsync{T}" />
6266
public async Task UpdateAsync(bool overwrite = false, CancellationToken cancellationToken = default(CancellationToken))
6367
{
6468
AssertParentIsSet();
@@ -71,7 +75,7 @@ protected void AssertParentIsSet([CallerMemberName]string callerName = "")
7175
}
7276
}
7377

74-
/// <summary />
78+
/// <inheritdoc cref="ComputeApi.DeleteImageMetadataAsync" />
7579
public async Task DeleteAsync(string key, CancellationToken cancellationToken = default(CancellationToken))
7680
{
7781
if (!ContainsKey(key))

src/corelib/Compute/v2_1/ImageReference.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@
1010

1111
namespace OpenStack.Compute.v2_1
1212
{
13-
/// <summary />
13+
/// <summary>
14+
/// Reference to an image.
15+
/// </summary>
1416
public class ImageReference : IHaveExtraData, IServiceResource
1517
{
16-
/// <summary />
18+
/// <summary>
19+
/// The image identifier.
20+
/// </summary>
1721
[JsonProperty("id")]
1822
public virtual Identifier Id { get; set; }
1923

0 commit comments

Comments
 (0)