lib/kytoon/providers/cloud_cue/server.rb in kytoon-1.4.2 vs lib/kytoon/providers/cloud_cue/server.rb in kytoon-1.4.3

- old
+ new

@@ -12,10 +12,11 @@ attr_accessor :external_ip_addr attr_accessor :internal_ip_addr attr_accessor :cloud_server_id_number attr_accessor :flavor_id attr_accessor :image_id + attr_accessor :image_name attr_accessor :server_group_id attr_accessor :gateway attr_accessor :retry_count attr_accessor :error_message attr_accessor :status @@ -28,10 +29,11 @@ @external_ip_addr=options[:external_ip_addr] @internal_ip_addr=options[:internal_ip_addr] @cloud_server_id_number=options[:cloud_server_id_number] @flavor_id=options[:flavor_id] @image_id=options[:image_id] + @image_name=options[:image_name] @admin_password=options[:admin_password] @server_group_id=options[:server_group_id].to_i @gateway = [true, "true"].include?(options[:gateway]) @retry_count=options[:retry_count].to_i or 0 @error_message=options[:error_message] @@ -52,10 +54,15 @@ server.status(@status) if @status server.tag! "external-ip-addr", @external_ip_addr if @external_ip_addr server.tag! "internal-ip-addr", @internal_ip_addr if @internal_ip_addr server.tag! "cloud-server-id-number", @cloud_server_id_number if @cloud_server_id_number server.tag! "flavor-id", @flavor_id - server.tag! "image-id", @image_id + if @image_id then + server.tag! "image-id", @image_id + end + if @image_name then + server.tag! "image-name", @image_name + end server.tag! "admin-password", @admin_password server.tag! "server-group-id", @server_group_id server.tag! "gateway", "true" if gateway? server.tag! "error-message", @error_message if @error_message end