Class: StudioApi::Appliance::Configuration::Firewall
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- StudioApi::Appliance::Configuration::Firewall
- Extended by:
- StudioResource
- Defined in:
- lib/studio_api/appliance.rb
Instance Method Summary collapse
Methods included from StudioResource
collection_path, element_path, extended, studio_connection, studio_connection=
Instance Method Details
#to_xml(options = {}) ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/studio_api/appliance.rb', line 54 def to_xml(={}) if enabled == "false" "<firewall><enabled>false</enabled></firewall>" else openports_xml = open_port.reduce(""){ |acc,p| acc << "<open_port>#{p}</open_port>" } #FIXME escape name "<firewall><enabled>true</enabled>#{openports_xml}</firewall>" end end |