lib/fog/oraclecloud/compute.rb in fog-oraclecloud-0.1.13 vs lib/fog/oraclecloud/compute.rb in fog-oraclecloud-0.1.14
- old
+ new
@@ -31,10 +31,18 @@
collection :orchestrations
model :volume
collection :volumes
+ model :ip_reservation
+ collection :ip_reservations
+ model :ip_network
+ collection :ip_networks
+
+ model :storage_attachment
+ collection :storage_attachments
+
request_path 'fog/oraclecloud/requests/compute'
request :list_security_applications
request :create_security_application
request :delete_security_application
request :get_security_application
@@ -77,10 +85,25 @@
request :stop_orchestration
request :list_volumes
request :create_volume
+ request :list_ip_reservations
+ request :get_ip_reservation
+ request :create_ip_reservation
+ request :delete_ip_reservation
+ request :update_ip_reservation
+
+ request :list_ip_networks
+ request :get_ip_network
+ request :create_ip_network
+ request :delete_ip_network
+
+ request :list_storage_attachments
+ request :get_storage_attachment
+ request :create_storage_attachment
+
class Real
def initialize(options={})
@username = options[:oracle_username]
@password = options[:oracle_password]
@@ -124,15 +147,17 @@
}.merge!(params[:headers] || {})
}), &block)
rescue Excon::Errors::HTTPStatusError => error
raise case error
when Excon::Errors::NotFound
+ puts "not found"
Fog::Compute::OracleCloud::NotFound.slurp(error)
when Excon::Errors::Conflict
data = Fog::JSON.decode(error.response.body)
raise Error.new(data['message'])
else
+ puts "else"
error
end
end
if !response.body.empty? && parse_json
response.body = Fog::JSON.decode(response.body)
@@ -153,9 +178,12 @@
def self.data
@data ||= {
:instances => {},
:sshkeys => {},
:orchestrations => {},
+ :ip_reservations => {},
+ :ip_networks => {},
+ :storage_attachments => {},
:image_lists => {
"/oracle/public/Oracle_Linux_7" => {
"name" => "/oracle/public/Oracle_Linux_7",
"default" => 1,
"description" => "Oracle Linux 7",
\ No newline at end of file