Skip to content

Commit 7ff6564

Browse files
committed
merge from onesdk-phas2
2 parents 8a59b8a + d860931 commit 7ff6564

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ public override void ExecuteCmdlet()
135135

136136
private bool ProcessParameters()
137137
{
138+
// Make sure that atleast one of the settings has been provided.
139+
// Its no use making a request when the user didnt specify any of
140+
// the settings.
141+
if (string.IsNullOrEmpty(NewName) && TimeZone == null &&
142+
string.IsNullOrEmpty(SecondaryDnsServer) &&
143+
(StorSimpleNetworkConfig == null || StorSimpleNetworkConfig.Count() < 1))
144+
{
145+
throw new ArgumentException(Resources.SetAzureStorSimpleDeviceNoSettingsProvided);
146+
}
147+
138148
// Make sure that the DeviceId property has the appropriate value irrespective of the parameter set
139149
if (ParameterSetName == StorSimpleCmdletParameterSet.IdentifyByName)
140150
{

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

Lines changed: 9 additions & 0 deletions
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,4 +526,8 @@ a special character</value>
526526
<data name="SnapshotPasswordLengthError" xml:space="preserve">
527527
<value>The SnapshotManagerPassword must be either 14 or 15 characters long</value>
528528
</data>
529+
<data name="SetAzureStorSimpleDeviceNoSettingsProvided" xml:space="preserve">
530+
<value>No settings were provided for updating device details.</value>
531+
532+
</data>
529533
</root>

0 commit comments

Comments
 (0)