Class: Inspec::Resources::AzureGenericResource
- Inherits:
-
AzureResourceBase
- Object
- AzureResourceBase
- Inspec::Resources::AzureGenericResource
- Defined in:
- lib/resources/azure/azure_generic_resource.rb
Instance Attribute Summary collapse
-
#counts ⇒ Object
Returns the value of attribute counts.
-
#filter ⇒ Object
Returns the value of attribute filter.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#probes ⇒ Object
Returns the value of attribute probes.
-
#total ⇒ Object
Returns the value of attribute total.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from AzureResourceBase
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ AzureGenericResource
constructor
A new instance of AzureGenericResource.
- #parse_resource(resource) ⇒ Object
Methods inherited from AzureResourceBase
#catch_azure_errors, #create_tag_methods, #failed_resource?, #has_tags?, #resource_group, #resources, #tag_count
Constructor Details
#initialize(opts = {}) ⇒ AzureGenericResource
Returns a new instance of AzureGenericResource.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/resources/azure/azure_generic_resource.rb', line 16 def initialize(opts = {}) Inspec.deprecate(:resource_azure_generic_resource) # Call the parent class constructor super(opts) # Get the resource group resource_group # Get the resources resources # Create the tag methods create_tag_methods end |
Instance Attribute Details
#counts ⇒ Object
Returns the value of attribute counts.
14 15 16 |
# File 'lib/resources/azure/azure_generic_resource.rb', line 14 def counts @counts end |
#filter ⇒ Object
Returns the value of attribute filter.
14 15 16 |
# File 'lib/resources/azure/azure_generic_resource.rb', line 14 def filter @filter end |
#location ⇒ Object
Returns the value of attribute location.
14 15 16 |
# File 'lib/resources/azure/azure_generic_resource.rb', line 14 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/resources/azure/azure_generic_resource.rb', line 14 def name @name end |
#probes ⇒ Object
Returns the value of attribute probes.
14 15 16 |
# File 'lib/resources/azure/azure_generic_resource.rb', line 14 def probes @probes end |
#total ⇒ Object
Returns the value of attribute total.
14 15 16 |
# File 'lib/resources/azure/azure_generic_resource.rb', line 14 def total @total end |
#type ⇒ Object
Returns the value of attribute type.
14 15 16 |
# File 'lib/resources/azure/azure_generic_resource.rb', line 14 def type @type end |
Instance Method Details
#parse_resource(resource) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/resources/azure/azure_generic_resource.rb', line 42 def parse_resource(resource) # return a hash of information parsed = { "location" => resource.location, "name" => resource.name, "type" => resource.type, "exist?" => true, "properties" => AzureResourceProbe.new(resource.properties), } parsed end |