Skip to content

Commit

Permalink
Merge pull request #28 from AzCiS/bugfix-2074697
Browse files Browse the repository at this point in the history
Fix bug 2074697 - Set-ASSDevice silently terminates when no optional par...
  • Loading branch information
avirupch committed Mar 25, 2015
2 parents 6acc061 + 7262852 commit d860931
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ public override void ExecuteCmdlet()

private bool ProcessParameters()
{
// Make sure that atleast one of the settings has been provided.
// Its no use making a request when the user didnt specify any of
// the settings.
if (string.IsNullOrEmpty(NewName) && TimeZone == null &&
string.IsNullOrEmpty(SecondaryDnsServer) &&
(StorSimpleNetworkConfig == null || StorSimpleNetworkConfig.Count() < 1))
{
throw new ArgumentException(Resources.SetAzureStorSimpleDeviceNoSettingsProvided);
}

// Make sure that the DeviceId property has the appropriate value irrespective of the parameter set
if (ParameterSetName == StorSimpleCmdletParameterSet.IdentifyByName)
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -513,4 +513,7 @@
<data name="CIKInvalidWithException" xml:space="preserve">
<value>Invalid value for Registration Key. CIK provided couldnt be used to decrypt the secrets! The exact exception while decrypting is "{0}"!</value>
</data>
<data name="SetAzureStorSimpleDeviceNoSettingsProvided" xml:space="preserve">
<value>No settings were provided for updating device details.</value>
</data>
</root>

0 comments on commit d860931

Please sign in to comment.