Class: EdgeGateway
- Inherits:
-
Object
- Object
- EdgeGateway
- Defined in:
- lib/vcloud_network_configurator/edge_gateway.rb
Instance Method Summary collapse
- #apply_configuration ⇒ Object
-
#initialize(options) ⇒ EdgeGateway
constructor
A new instance of EdgeGateway.
Constructor Details
#initialize(options) ⇒ EdgeGateway
Returns a new instance of EdgeGateway.
7 8 9 10 |
# File 'lib/vcloud_network_configurator/edge_gateway.rb', line 7 def initialize @options = @vcloud_settings = VcloudSettings.new( { url: @options[:api_url], edge_gateway_uuid: @options[:org_edgegateway_uuid] } ) end |
Instance Method Details
#apply_configuration ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vcloud_network_configurator/edge_gateway.rb', line 12 def apply_configuration auth_header = configure_request = VcloudConfigureRequest.new(@vcloud_settings, auth_header, @options[:component], @options[:rules_files], @options[:interfaces_files]) configure_request.submit if configure_request.success? check_for_success auth_header, ConfigureTask.new(configure_request.response_body) return true else abort("Failed to configure the edge gateway") end end |