Skip to content

Commit 1218bff

Browse files
authored
refreshing sdk for intersight version 1.0.11-13010 (#104)
1 parent fd3bfb7 commit 1218bff

34 files changed

+167
-145
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ The Cisco Intersight.PowerShell module is updated frequently to be in sync with
8888

8989
<a name="requirements"></a>
9090
### 1.1. Requirements
91-
- PowerShell 7.1 or later
92-
- dotnet SDK 3.1 or later
91+
- PowerShell 7.3.3 or later
92+
- net6.0 SDK or later
9393

9494
<a name="dependencies"></a>
9595
#### Dependencies

build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ $manifestParam = @{
3636
Author = "Cisco Systems"
3737
CompanyName = "Cisco Systems"
3838
ModuleVersion = "1.0.11.13010"
39-
Copyright = "(c) 2021 Cisco Systems, Inc. All rights reserved."
39+
Copyright = "(c) 2023 Cisco Systems, Inc. All rights reserved."
4040
LicenseUri = "https://www.apache.org/licenses/LICENSE-2.0.txt"
4141
ProjectUri = "https://github.com/CiscoDevNet/intersight-powershell"
4242
CompatiblePSEditions = "Core"
4343
Tag = @('PSEdition_Core','Windows','Linux','MacOSX','Intersight','IntersightCmdlets')
44-
PowerShellVersion = "7.1"
44+
PowerShellVersion = "7.3.3"
4545
CmdletsToExport = $commandList
4646
Description = "Intersight Powershell module provides the cmdlets to manage, analyze, and automate the IT infrastructure in Intersight."
4747
ReleaseNotes = "Intersight.PowerShell - Version 1.0.11.13010

docs/Initialize-IntersightSnmpTrap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Fill in the Synopsis
1414

1515
```
1616
17-
Initialize-IntersightSnmpTrap [-AdditionalProperties< System.Collections.Generic.Dictionary`2[string,object]>][-ClassId< SnmpTrap.ClassIdEnum>][-Community< string>][-Destination< string>][-Enabled< bool>][-ObjectType< SnmpTrap.ObjectTypeEnum>][-Port< long>][-Type< SnmpTrap.TypeEnum>][-User< string>][-Version< SnmpTrap.VersionEnum>][-Json< SwitchParameter>][-WithHttpInfo< SwitchParameter>]
17+
Initialize-IntersightSnmpTrap [-AdditionalProperties< System.Collections.Generic.Dictionary`2[string,object]>][-ClassId< SnmpTrap.ClassIdEnum>][-Community< string>][-Destination< string>][-Enabled< bool>][-ObjectType< SnmpTrap.ObjectTypeEnum>][-Port< long>][-Type< SnmpTrap.TypeEnum>][-User< string>][-Version< SnmpTrap.VarVersionEnum>][-Json< SwitchParameter>][-WithHttpInfo< SwitchParameter>]
1818
1919
```
2020

@@ -163,7 +163,7 @@ Accept wildcard characters: False
163163
SNMP version used for the trap.\n* `V3` - SNMP v3 trap version notifications.\n* `V1` - SNMP v1 trap version notifications.\n* `V2` - SNMP v2 trap version notifications.
164164

165165
```yaml
166-
Type: SnmpTrap.VersionEnum
166+
Type: SnmpTrap.VarVersionEnum
167167
Parameter Sets: (All)
168168
Aliases:
169169

docs/Initialize-IntersightVnicRoceSettings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Fill in the Synopsis
1414

1515
```
1616
17-
Initialize-IntersightVnicRoceSettings [-AdditionalProperties< System.Collections.Generic.Dictionary`2[string,object]>][-ClassId< VnicRoceSettings.ClassIdEnum>][-ClassOfService< VnicRoceSettings.ClassOfServiceEnum>][-Enabled< bool>][-MemoryRegions< long>][-ObjectType< VnicRoceSettings.ObjectTypeEnum>][-QueuePairs< long>][-ResourceGroups< long>][-Version< VnicRoceSettings.VersionEnum>][-Json< SwitchParameter>][-WithHttpInfo< SwitchParameter>]
17+
Initialize-IntersightVnicRoceSettings [-AdditionalProperties< System.Collections.Generic.Dictionary`2[string,object]>][-ClassId< VnicRoceSettings.ClassIdEnum>][-ClassOfService< VnicRoceSettings.ClassOfServiceEnum>][-Enabled< bool>][-MemoryRegions< long>][-ObjectType< VnicRoceSettings.ObjectTypeEnum>][-QueuePairs< long>][-ResourceGroups< long>][-Version< VnicRoceSettings.VarVersionEnum>][-Json< SwitchParameter>][-WithHttpInfo< SwitchParameter>]
1818
1919
```
2020

@@ -148,7 +148,7 @@ Accept wildcard characters: False
148148
Configure RDMA over Converged Ethernet (RoCE) version on the virtual interface. Only RoCEv1 is supported on Cisco VIC 13xx series adapters and only RoCEv2 is supported on Cisco VIC 14xx series adapters.\n* `1` - RDMA over Converged Ethernet Protocol Version 1.\n* `2` - RDMA over Converged Ethernet Protocol Version 2.
149149

150150
```yaml
151-
Type: VnicRoceSettings.VersionEnum
151+
Type: VnicRoceSettings.VarVersionEnum
152152
Parameter Sets: (All)
153153
Aliases:
154154

externalHelp/Intersight.PowerShell.dll-Help.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -629361,9 +629361,9 @@ Note :- The output returns by the ParameterSet "QueryParam" cannot be piped to t
629361629361
<maml:description>
629362629362
<maml:para></maml:para>
629363629363
</maml:description>
629364-
<command:parameterValue required="true" variableLength="false">SoftwarerepositoryAuthorization.VersionEnum</command:parameterValue>
629364+
<command:parameterValue required="true" variableLength="false">SoftwarerepositoryAuthorization.VarVersionEnum</command:parameterValue>
629365629365
<dev:type>
629366-
<maml:name>SoftwarerepositoryAuthorization.VersionEnum</maml:name>
629366+
<maml:name>SoftwarerepositoryAuthorization.VarVersionEnum</maml:name>
629367629367
<maml:uri />
629368629368
</dev:type>
629369629369
<dev:defaultValue>None</dev:defaultValue>
@@ -629881,9 +629881,9 @@ literals. The literal values can be strings enclosed in single quotes, numbers a
629881629881
<maml:description>
629882629882
<maml:para>The Automated Software Distribution version of the authorization MO.\n* `V3` - The client is running Automated Software Distribution V3.\n* `V4` - The client is running Automated Software Distribution V4.</maml:para>
629883629883
</maml:description>
629884-
<command:parameterValue required="true" variableLength="false">SoftwarerepositoryAuthorization.VersionEnum</command:parameterValue>
629884+
<command:parameterValue required="true" variableLength="false">SoftwarerepositoryAuthorization.VarVersionEnum</command:parameterValue>
629885629885
<dev:type>
629886-
<maml:name>SoftwarerepositoryAuthorization.VersionEnum</maml:name>
629886+
<maml:name>SoftwarerepositoryAuthorization.VarVersionEnum</maml:name>
629887629887
<maml:uri />
629888629888
</dev:type>
629889629889
<dev:defaultValue>None</dev:defaultValue>
@@ -707741,9 +707741,9 @@ Note :- The output returns by the ParameterSet "QueryParam" cannot be piped to t
707741707741
<maml:description>
707742707742
<maml:para></maml:para>
707743707743
</maml:description>
707744-
<command:parameterValue required="true" variableLength="false">StorageNetAppNtpServer.VersionEnum</command:parameterValue>
707744+
<command:parameterValue required="true" variableLength="false">StorageNetAppNtpServer.VarVersionEnum</command:parameterValue>
707745707745
<dev:type>
707746-
<maml:name>StorageNetAppNtpServer.VersionEnum</maml:name>
707746+
<maml:name>StorageNetAppNtpServer.VarVersionEnum</maml:name>
707747707747
<maml:uri />
707748707748
</dev:type>
707749707749
<dev:defaultValue>None</dev:defaultValue>
@@ -708261,9 +708261,9 @@ literals. The literal values can be strings enclosed in single quotes, numbers a
708261708261
<maml:description>
708262708262
<maml:para>NTP protocol version for server. Valid versions are 3, 4, or auto.\n* `none` - Default unknown NTP protocol version.\n* `3` - NTP protocol version is 3.\n* `4` - NTP protocol version is 4.\n* `auto` - NTP protocol version is auto.</maml:para>
708263708263
</maml:description>
708264-
<command:parameterValue required="true" variableLength="false">StorageNetAppNtpServer.VersionEnum</command:parameterValue>
708264+
<command:parameterValue required="true" variableLength="false">StorageNetAppNtpServer.VarVersionEnum</command:parameterValue>
708265708265
<dev:type>
708266-
<maml:name>StorageNetAppNtpServer.VersionEnum</maml:name>
708266+
<maml:name>StorageNetAppNtpServer.VarVersionEnum</maml:name>
708267708267
<maml:uri />
708268708268
</dev:type>
708269708269
<dev:defaultValue>None</dev:defaultValue>
@@ -1224320,9 +1224320,9 @@ Initialize cmdlet is used to instantiate the object of complex type in the Power
12243201224320
<maml:description>
12243211224321
<maml:para></maml:para>
12243221224322
</maml:description>
1224323-
<command:parameterValue required="true" variableLength="false">SnmpTrap.VersionEnum</command:parameterValue>
1224323+
<command:parameterValue required="true" variableLength="false">SnmpTrap.VarVersionEnum</command:parameterValue>
12243241224324
<dev:type>
1224325-
<maml:name>SnmpTrap.VersionEnum</maml:name>
1224325+
<maml:name>SnmpTrap.VarVersionEnum</maml:name>
12243261224326
<maml:uri />
12243271224327
</dev:type>
12243281224328
<dev:defaultValue>None</dev:defaultValue>
@@ -1224468,9 +1224468,9 @@ Initialize cmdlet is used to instantiate the object of complex type in the Power
12244681224468
<maml:description>
12244691224469
<maml:para>SNMP version used for the trap.\n* `V3` - SNMP v3 trap version notifications.\n* `V1` - SNMP v1 trap version notifications.\n* `V2` - SNMP v2 trap version notifications.</maml:para>
12244701224470
</maml:description>
1224471-
<command:parameterValue required="true" variableLength="false">SnmpTrap.VersionEnum</command:parameterValue>
1224471+
<command:parameterValue required="true" variableLength="false">SnmpTrap.VarVersionEnum</command:parameterValue>
12244721224472
<dev:type>
1224473-
<maml:name>SnmpTrap.VersionEnum</maml:name>
1224473+
<maml:name>SnmpTrap.VarVersionEnum</maml:name>
12244741224474
<maml:uri />
12244751224475
</dev:type>
12244761224476
<dev:defaultValue>None</dev:defaultValue>
@@ -1335441,9 +1335441,9 @@ Initialize cmdlet is used to instantiate the object of complex type in the Power
13354411335441
<maml:description>
13354421335442
<maml:para></maml:para>
13354431335443
</maml:description>
1335444-
<command:parameterValue required="true" variableLength="false">VnicRoceSettings.VersionEnum</command:parameterValue>
1335444+
<command:parameterValue required="true" variableLength="false">VnicRoceSettings.VarVersionEnum</command:parameterValue>
13354451335445
<dev:type>
1335446-
<maml:name>VnicRoceSettings.VersionEnum</maml:name>
1335446+
<maml:name>VnicRoceSettings.VarVersionEnum</maml:name>
13354471335447
<maml:uri />
13354481335448
</dev:type>
13354491335449
<dev:defaultValue>None</dev:defaultValue>
@@ -1335577,9 +1335577,9 @@ Initialize cmdlet is used to instantiate the object of complex type in the Power
13355771335577
<maml:description>
13355781335578
<maml:para>Configure RDMA over Converged Ethernet (RoCE) version on the virtual interface. Only RoCEv1 is supported on Cisco VIC 13xx series adapters and only RoCEv2 is supported on Cisco VIC 14xx series adapters.\n* `1` - RDMA over Converged Ethernet Protocol Version 1.\n* `2` - RDMA over Converged Ethernet Protocol Version 2.</maml:para>
13355791335579
</maml:description>
1335580-
<command:parameterValue required="true" variableLength="false">VnicRoceSettings.VersionEnum</command:parameterValue>
1335580+
<command:parameterValue required="true" variableLength="false">VnicRoceSettings.VarVersionEnum</command:parameterValue>
13355811335581
<dev:type>
1335582-
<maml:name>VnicRoceSettings.VersionEnum</maml:name>
1335582+
<maml:name>VnicRoceSettings.VarVersionEnum</maml:name>
13355831335583
<maml:uri />
13355841335584
</dev:type>
13355851335585
<dev:defaultValue>None</dev:defaultValue>

src/Cmdlet/SoftwarerepositoryCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public string UserId
172172
/// </summary>
173173
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ValueFromPipeline = false, ParameterSetName = "CmdletParam")]
174174

175-
public SoftwarerepositoryAuthorization.VersionEnum Version
175+
public SoftwarerepositoryAuthorization.VarVersionEnum Version
176176
{
177177
get;
178178
set;

src/Cmdlet/StorageCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18562,7 +18562,7 @@ public string SharedScope
1856218562
/// </summary>
1856318563
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ValueFromPipeline = false, ParameterSetName = "CmdletParam")]
1856418564

18565-
public StorageNetAppNtpServer.VersionEnum Version
18565+
public StorageNetAppNtpServer.VarVersionEnum Version
1856618566
{
1856718567
get;
1856818568
set;

src/CmdletBase/ConfigurationCmdlet.cs

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Security.Cryptography;
88
using System.Net;
99
using Intersight.Api;
10+
using System.IO;
1011

1112
namespace Intersight.PowerShell
1213
{
@@ -15,14 +16,15 @@ public class ConfigInfo
1516
public string BasePath { get; set; }
1617
public string ApiKeyId { get; set; }
1718
public string ApiKeyFilePath { get; set; }
19+
public string ApiKeyString { get; set; }
1820
public SecureString ApiKeyPassPhrase { get; set; }
1921
public WebProxy Proxy { get; set; }
2022
public string HashAlgorithm { get; set; }
2123
public List<string> HttpSigningHeader { get; set; }
2224
public int SignatureValidityPeriod { get; set; }
2325

2426
}
25-
[Cmdlet(VerbsCommon.Set, "IntersightConfiguration")]
27+
[Cmdlet(VerbsCommon.Set, "IntersightConfiguration", DefaultParameterSetName = "KeyPath")]
2628
public class SetConfigurationCmdlet : PSCmdlet
2729
{
2830
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true)]
@@ -31,9 +33,12 @@ public class SetConfigurationCmdlet : PSCmdlet
3133
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true)]
3234
public string ApiKeyId { get; set; }
3335

34-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true)]
36+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "KeyPath")]
3537
public string ApiKeyFilePath { get; set; }
3638

39+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "KeyString")]
40+
public string ApiKeyString { get; set; }
41+
3742
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true)]
3843
public String ApiKeyPassPhrase { get; set; }
3944

@@ -58,10 +63,23 @@ protected override void ProcessRecord()
5863
HttpSigningConfiguration httpConfig = new HttpSigningConfiguration()
5964
{
6065
KeyId = this.ApiKeyId,
61-
KeyFilePath = this.ApiKeyFilePath,
6266
HttpSigningHeader = this.HttpSigningHeader
6367
};
6468

69+
if (!File.Exists(this.ApiKeyFilePath) && string.IsNullOrEmpty(this.ApiKeyString))
70+
{
71+
throw new Exception("No API Key provided.");
72+
}
73+
74+
if (this.ParameterSetName.Equals("KeyPath"))
75+
{
76+
httpConfig.KeyFilePath = this.ApiKeyFilePath;
77+
}
78+
else if (this.ParameterSetName.Equals("KeyString"))
79+
{
80+
httpConfig.KeyString = this.ApiKeyString;
81+
}
82+
6583
if (this.HttpSigningHeader.Contains("(expires)"))
6684
{
6785
if (SignatureValidityPeriod <= 0)
@@ -160,6 +178,10 @@ protected override void ProcessRecord()
160178
configInfo.HttpSigningHeader = CmdletBase.Config.HttpSigningConfiguration.HttpSigningHeader;
161179
configInfo.HashAlgorithm = CmdletBase.Config.HttpSigningConfiguration.HashAlgorithm.Name;
162180
configInfo.SignatureValidityPeriod = CmdletBase.Config.HttpSigningConfiguration.SignatureValidityPeriod;
181+
if (string.IsNullOrEmpty(CmdletBase.Config.HttpSigningConfiguration.KeyFilePath))
182+
{
183+
configInfo.ApiKeyString = CmdletBase.Config.HttpSigningConfiguration.KeyString;
184+
}
163185
}
164186

165187
configInfo.Proxy = CmdletBase.Config.Proxy;

src/InitializeCmdlet/aaa.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ protected override void ProcessRecord()
140140
initObject.ClassId = this.ClassId;
141141
if (this.MyInvocation.BoundParameters.ContainsKey("Event"))
142142
{
143-
initObject.Event = this.Event;
143+
initObject.VarEvent = this.Event;
144144
}
145145
if (this.MyInvocation.BoundParameters.ContainsKey("MoDisplayNames"))
146146
{

src/InitializeCmdlet/capability.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ protected override void ProcessRecord()
772772
}
773773
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
774774
{
775-
initObject._Version = this.Version;
775+
initObject.VarVersion = this.Version;
776776
}
777777
WriteObject(initObject);
778778
}
@@ -1150,7 +1150,7 @@ protected override void ProcessRecord()
11501150
}
11511151
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
11521152
{
1153-
initObject._Version = this.Version;
1153+
initObject.VarVersion = this.Version;
11541154
}
11551155
WriteObject(initObject);
11561156
}
@@ -1612,7 +1612,7 @@ protected override void ProcessRecord()
16121612
}
16131613
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
16141614
{
1615-
initObject._Version = this.Version;
1615+
initObject.VarVersion = this.Version;
16161616
}
16171617
WriteObject(initObject);
16181618
}
@@ -2636,7 +2636,7 @@ protected override void ProcessRecord()
26362636
}
26372637
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
26382638
{
2639-
initObject._Version = this.Version;
2639+
initObject.VarVersion = this.Version;
26402640
}
26412641
WriteObject(initObject);
26422642
}
@@ -3225,7 +3225,7 @@ protected override void ProcessRecord()
32253225
}
32263226
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
32273227
{
3228-
initObject._Version = this.Version;
3228+
initObject.VarVersion = this.Version;
32293229
}
32303230
WriteObject(initObject);
32313231
}
@@ -3842,7 +3842,7 @@ protected override void ProcessRecord()
38423842
}
38433843
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
38443844
{
3845-
initObject._Version = this.Version;
3845+
initObject.VarVersion = this.Version;
38463846
}
38473847
WriteObject(initObject);
38483848
}
@@ -4542,7 +4542,7 @@ protected override void ProcessRecord()
45424542
}
45434543
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
45444544
{
4545-
initObject._Version = this.Version;
4545+
initObject.VarVersion = this.Version;
45464546
}
45474547
WriteObject(initObject);
45484548
}
@@ -4892,7 +4892,7 @@ protected override void ProcessRecord()
48924892
}
48934893
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
48944894
{
4895-
initObject._Version = this.Version;
4895+
initObject.VarVersion = this.Version;
48964896
}
48974897
WriteObject(initObject);
48984898
}
@@ -5200,7 +5200,7 @@ protected override void ProcessRecord()
52005200
}
52015201
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
52025202
{
5203-
initObject._Version = this.Version;
5203+
initObject.VarVersion = this.Version;
52045204
}
52055205
WriteObject(initObject);
52065206
}
@@ -5578,7 +5578,7 @@ protected override void ProcessRecord()
55785578
}
55795579
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
55805580
{
5581-
initObject._Version = this.Version;
5581+
initObject.VarVersion = this.Version;
55825582
}
55835583
WriteObject(initObject);
55845584
}
@@ -6083,7 +6083,7 @@ protected override void ProcessRecord()
60836083
}
60846084
if (this.MyInvocation.BoundParameters.ContainsKey("Version"))
60856085
{
6086-
initObject._Version = this.Version;
6086+
initObject.VarVersion = this.Version;
60876087
}
60886088
WriteObject(initObject);
60896089
}

0 commit comments

Comments
 (0)