lib/azure/armrest/configuration.rb
# Validate the subscription ID for the given credentials. Returns the
# subscription ID if valid.
#
# If the subscription ID that was provided in the constructor cannot
# be found within the list of valid subscriptions, then an error is
# raised.
#
# If the subscription ID that was provided is found but disabled
# then a warning will be issued, but no error will be raised.
#
Validate the subscription ID for the given credentials. Returns the
subscription ID if valid.

If the subscription ID that was provided in the constructor cannot
be found within the list of valid subscriptions, then an error is
raised.

If the subscription ID that was provided is found but disabled
then a warning will be issued, but no error will be raised.
Validate the subscription ID for the given credentials . Returns the subscription ID if valid . If the subscription ID that was provided in the constructor cannot be found within the list of valid subscriptions then an error is raised . If the subscription ID that was provided is found but disabled then a warning will be issued but no error will be raised .
def validate_subscription
        found = subscriptions.find { |sub| sub.subscription_id == subscription_id }
        unless found
          raise ArgumentError, "Subscription ID '#{subscription_id}' not found"
        end
        if found.state.casecmp('enabled') != 0
          warn "Subscription '#{found.subscription_id}' found but not enabled."
        end
      end
def validate_subscription found = subscriptions . find { | sub | sub . subscription_id == subscription_id } unless found raise ArgumentError , "Subscription ID '#{subscription_id}' not found" end if found . state . casecmp ( 'enabled' ) != 0 warn "Subscription '#{found.subscription_id}' found but not enabled." end end
Validate the subscription ID for the given credentials.
Validate the subscription ID for the given credentials .