lib/fog/oraclecloud/soa.rb in fog-oraclecloud-0.1.9 vs lib/fog/oraclecloud/soa.rb in fog-oraclecloud-0.1.10
- old
+ new
@@ -1,19 +1,21 @@
module Fog
module OracleCloud
class SOA < Fog::Service
- requires :oracle_username, :oracle_password, :oracle_domain, :oracle_region
+ requires :oracle_username, :oracle_password, :oracle_domain
+ recognizes :oracle_region
model_path 'fog/oraclecloud/models/soa'
model :instance
collection :instances
request_path 'fog/oraclecloud/requests/soa'
request :list_instances
request :create_instance
request :get_instance
request :delete_instance
+ request :get_job_status
class Real
def initialize(options={})
@username = options[:oracle_username]
@@ -23,10 +25,18 @@
Excon.ssl_verify_peer = false
@connection = Fog::XML::Connection.new(region_url)
end
+ def username
+ @username
+ end
+
+ def password
+ @password
+ end
+
def auth_header
auth_header ||= 'Basic ' + Base64.encode64("#{@username}:#{@password}").gsub("\n",'')
end
def request(params, parse_json = true, &block)
@@ -64,19 +74,18 @@
@password = options[:oracle_password]
@identity_domain = options[:oracle_domain]
@region_url = options[:oracle_region] == 'emea' ? 'https://jcs.emea.oraclecloud.com' : 'https://jaas.oraclecloud.com'
end
- def username
+ def username
@username
end
def password
@password
end
-
- def self.data
+ def self.data
@data ||= {
:instances => {},
:servers => {},
:deleted_at => {},
:created_at => {}