mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Minor Fixes: Remove unncessary prints. Use override_path instead of replace class variable path.
This commit is contained in:
parent
06484ccc21
commit
46d8808c08
3 changed files with 3 additions and 10 deletions
|
@ -54,13 +54,11 @@ module Fog
|
|||
# { '0' => 'Being created', '2' => 'Powered Off', '4' => 'Powered On'}
|
||||
def ready?
|
||||
state = connection.get_vapp(id).body["status"]
|
||||
puts " id : #{id}, state : #{state}"
|
||||
state == '2'
|
||||
end
|
||||
|
||||
def on?
|
||||
state = connection.get_vapp(id).body["status"]
|
||||
puts " id : #{id}, state : #{state}"
|
||||
state == '4'
|
||||
end
|
||||
|
||||
|
|
|
@ -31,12 +31,8 @@ module Fog
|
|||
unless options.has_key?('Enabled')
|
||||
options['Enabled'] = true
|
||||
end
|
||||
org_path = @path
|
||||
#Sample: "https://services.vcloudexpress.terremark.com/api/extensions/v1.6/vdc/3142/internetServices"
|
||||
path = vdcs.get(vdc_id).links.find { |item| item['name'] == 'Internet Services'}['href'].split(@host)[1]
|
||||
@path = path
|
||||
puts "PATH =#{path}"
|
||||
puts "PATHA = #{@path}"
|
||||
data = <<-DATA
|
||||
<CreateInternetServiceRequest xml:lang="en" xmlns="urn:tmrk:vCloudExpressExtensions-1.6" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Name>#{name}</Name>
|
||||
|
@ -51,9 +47,10 @@ module Fog
|
|||
:expects => 200,
|
||||
:headers => {'Content-Type' => 'application/vnd.tmrk.vCloud.internetService+xml'},
|
||||
:method => 'POST',
|
||||
:parser => Fog::Parsers::Terremark::Shared::InternetService.new
|
||||
:parser => Fog::Parsers::Terremark::Shared::InternetService.new,
|
||||
:path => path,
|
||||
:override_path => true
|
||||
)
|
||||
@path = org_path
|
||||
response
|
||||
end
|
||||
|
||||
|
|
|
@ -81,8 +81,6 @@ module Fog
|
|||
else
|
||||
path = "#{@path}"
|
||||
end
|
||||
puts "PATH in do_request: #{path}"
|
||||
puts "HOST in do_request: #{@host}"
|
||||
@connection.request({
|
||||
:body => params[:body],
|
||||
:expects => params[:expects],
|
||||
|
|
Loading…
Add table
Reference in a new issue