lib/azure/armrest/resource_provider_service.rb in azure-armrest-0.9.10 vs lib/azure/armrest/resource_provider_service.rb in azure-armrest-0.9.11

- old
+ new

@@ -116,9 +116,17 @@ get(namespace).registration_state.casecmp("registered").zero? rescue Azure::Armrest::NotFoundException false end + # Returns whether or not the given +resource_type+ is supported by the + # given +namespace+. By default it will search the Microsoft.Compute + # namespace. + # + def supported?(resource_type, namespace = 'Microsoft.Compute') + get(namespace).resource_types.map(&:resource_type).map(&:downcase).include?(resource_type.downcase) + end + private def build_url(namespace = nil, *args) id = configuration.subscription_id url = File.join(base_url, 'providers')