Class: StudioApi::Appliance::Configuration
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- StudioApi::Appliance::Configuration
- Extended by:
- StudioResource
- Defined in:
- lib/studio_api/appliance.rb
Overview
Represent appliance configuration
Defined Under Namespace
Classes: Firewall
Class Method Summary collapse
Instance Method Summary collapse
Methods included from StudioResource
collection_path, element_path, extended, studio_connection, studio_connection=
Class Method Details
.find(id, prefix_options = {}) ⇒ Object
38 39 40 41 42 |
# File 'lib/studio_api/appliance.rb', line 38 def self.find (id, ={}) request_str = "/appliances/#{id.to_i}/configuration" response = GenericRequest.new(studio_connection).get request_str Configuration.parse response end |
Instance Method Details
#update ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/studio_api/appliance.rb', line 44 def update appliance_id = id attributes.delete "id" rq = GenericRequest.new self.class.studio_connection rq.put "/appliances/#{appliance_id.to_i}/configuration", :__raw => to_xml attributes["id"] = appliance_id end |