Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

images#register: Add compatibility mode switch. Fixes #3663

  • Loading branch information...
commit d3182b69f5ff09d74fb10bda09dcb37bd6b7129a 1 parent 371bf30
@johnl johnl authored
View
9 lib/bbcloud/commands/images-register.rb
@@ -10,13 +10,20 @@
c.desc "Source filename of the image you uploaded to the image library"
c.flag [:s, "source"]
+ c.desc "This image does not support virtio so needs 'compatibility mode'"
+ c.switch [:c, "compatibility"]
+
+ c.desc "Image description"
+ c.flag [:d, "description"]
+
c.action do |global_options,options,args|
raise "You must specify the architecture" unless options[:a]
raise "You must specify the source filename" unless options[:s]
image = Image.register :name => options[:n], :arch => options[:a],
- :source => options[:s]
+ :source => options[:s], :compatibility_mode => options[:c],
+ :description => options[:d]
render_table([image])
View
2  lib/bbcloud/commands/images-show.rb
@@ -14,7 +14,7 @@
table_opts = global_options.merge({
:vertical => true,
- :fields => [:id, :type, :owner, :created_at, :status, :arch, :name, :description, :virtual_size, :disk_size, :ancestor_id ]
+ :fields => [:id, :type, :owner, :created_at, :status, :arch, :name, :description, :virtual_size, :disk_size, "compatibility_mode", :official, :ancestor_id ]
})
render_table(images, table_opts)
Please sign in to comment.
Something went wrong with that request. Please try again.