Skip to content

Commit 48ca3d5

Browse files
committed
Merge pull request #24 from AzCiS/data0-iscsi-fix
Fix enableiscsibug in New-ASSConfig and add validation for first time se...
2 parents 209a183 + e559558 commit 48ca3d5

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/ServiceManagement/StorSimple/Commands.StorSimple/Cmdlets/DeviceDetails/NewAzureStorSimpleNetworkConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ private bool ProcessParameters(){
178178
return false;
179179
}
180180

181-
// Only EnableCloud, Controller0 and controller1 IP Addresses can be set on Data0
181+
// Only EnableIscsi, Controller0 and controller1 IP Addresses can be set on Data0
182182
if (InterfaceAlias == NetInterfaceId.Data0.ToString())
183183
{
184184
if(IPv4Address != null || IPv4Gateway != null || IPv4Netmask != null
185-
&& IPv6Gateway != null || IPv6Prefix != null || EnableIscsi != null)
185+
&& IPv6Gateway != null || IPv6Prefix != null || EnableCloud != null)
186186
{
187187
WriteVerbose(Resources.NetworkConfigData0AllowedSettings);
188188
return false;

src/ServiceManagement/StorSimple/Commands.StorSimple/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ServiceManagement/StorSimple/Commands.StorSimple/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@
427427
<value>IP Address information (IPv4Address and IPv4Netmask or IPv6Prefix) must be provided for {0} network interface, since it is being enabled</value>
428428
</data>
429429
<data name="MandatoryParamsMissingForInitialDeviceConfiguration" xml:space="preserve">
430-
<value>Data0 configuration with Controller0 and Controller1 IP Addresses along with TimeZone and Primary DNS Server information is mandatory when configuring the device for the first time</value>
430+
<value>Data0 configuration with Controller0 and Controller1 IP Addresses along with TimeZone, Secondary DNS Server information and atleast 1 IscsiEnabled network interface is mandatory when configuring the device for the first time.</value>
431431
</data>
432432
<data name="DeviceJobsNextPageFormatMessage" xml:space="preserve">
433433
<value>More jobs are available for your query. To access the next page of your result use -First {0} -Skip {1} in your commandlet</value>

src/ServiceManagement/StorSimple/Commands.StorSimple/StorSimpleCmdletBase.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,14 @@ internal bool ValidParamsForFirstDeviceConfiguration(NetworkConfig[] netConfigs,
486486
{
487487
return false;
488488
}
489+
490+
// There must be atleast one iscsi enabled net interface in the first config
491+
var iscsiEnabledInterfacePresent = netConfigs.Any(x => x.IsIscsiEnabled == true);
492+
if (!iscsiEnabledInterfacePresent)
493+
{
494+
return false;
495+
}
496+
489497
return true;
490498
}
491499

0 commit comments

Comments
 (0)