lib/fog/oraclecloud/models/java/instance.rb in fog-oraclecloud-0.1.1 vs lib/fog/oraclecloud/models/java/instance.rb in fog-oraclecloud-0.1.2
- old
+ new
@@ -55,10 +55,11 @@
# The following are only used to create an instance and are not returned in the list action
attribute :cloud_storage_container, :aliases=>'cloudStorageContainer'
attribute :cloud_storage_user, :aliases=>'cloudStorageUser'
attribute :cloud_storage_password, :aliases=>'cloudStoragePassword'
attribute :admin_user_name, :aliases=>'adminUserName'
+ attribute :vm_public_key, :aliases=>'vmPublicKey'
# The following are used to delete an instance and are not returned in the list action
attribute :dba_name
attribute :dba_password
attribute :force_delete
@@ -78,10 +79,18 @@
def ready?
status == "Running"
end
+ def stopping?
+ status == 'Maintenance' || status == 'Terminating'
+ end
+
+ def stopped?
+ status == 'Stopped'
+ end
+
def servers
service.servers.all(service_name)
end
def destroy
@@ -90,14 +99,14 @@
end
private
def create
- requires :service_name, :cloudStorageContainer, :cloudStorageUser, :cloudStoragePassword, :parameters
+ requires :service_name, :cloud_storage_container, :cloud_storage_user, :cloud_storage_password
- data = service.create_instance(service_name, cloudStorageContainer, cloudStorageUser, cloudStoragePassword, parameters,
+ data = service.create_instance(service_name, cloud_storage_container, cloud_storage_user, cloud_storage_password, dba_name, dba_password, db_servicename, shape, version, vm_public_key,
:level => level,
- :subscriptionType => subscriptionType,
+ :subscriptionType => subscription_type,
:description => description)
end
end