Class: Kontena::Plugin::Cloud::Image::CreateCommand
- Inherits:
-
Command
- Object
- Clamp::Command
- Command
- Kontena::Plugin::Cloud::Image::CreateCommand
- Includes:
- Cli::Common, Cli::TableGenerator::Helper, Common, Util
- Defined in:
- lib/kontena/plugin/cloud/image/create_command.rb
Constant Summary
Constants included from CloudCommand
CloudCommand::PLATFORM_NOT_SELECTED_ERROR
Instance Method Summary collapse
Methods included from Common
#default_org, #image_distribution_url, #image_registry_client, #image_registry_url
Methods included from CloudCommand
#verify_current_grid, #verify_current_master, #verify_current_master_token
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/kontena/plugin/cloud/image/create_command.rb', line 13 def execute body = { data: { type: 'repositories', id: self.name } } spinner "Creating image repository #{pastel.cyan(name)}" do image_registry_client.post("/repositories", JSON.dump(body)) end end |