Sha256: c866bb0be1c68e785686cb63ae3e1615bff16cc4ea2236adeda2b30d1b3fcc91
Contents?: true
Size: 639 Bytes
Versions: 1
Compression:
Stored size: 639 Bytes
Contents
# Pick Resource Group name from Azure Resource Id(String) def get_resource_group_from_id(id) id.split('/')[4] end # Pick Virtual Network name from Subnet Resource Id(String) def get_virtual_network_from_id(subnet_id) subnet_id.split('/')[8] end # Make sure if input_params(Hash) contains all keys present in required_params(Array) def validate_params(required_params, input_params) missing_params = required_params.select { |param| param unless input_params.key?(param) } if missing_params.any? raise(ArgumentError, "Missing Parameters: #{missing_params.join(', ')} required for this operation") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.0.4 | lib/fog/azurerm/utilities/general.rb |