Module: Kontena::Plugin::Cloud::Image::Common
- Included in:
- CreateCommand, ListCommand, LoginCommand, RemoveCommand, ShowCommand, Tag::ListCommand
- Defined in:
- lib/kontena/plugin/cloud/image/common.rb
Instance Method Summary collapse
- #default_org ⇒ Object
- #image_distribution_url ⇒ Object
- #image_registry_client ⇒ Object
- #image_registry_url ⇒ Object
Instance Method Details
#default_org ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/kontena/plugin/cloud/image/common.rb', line 17 def default_org unless current_master exit_with_error "Organization is required" end org, _ = current_master.name.split('/') org end |
#image_distribution_url ⇒ Object
13 14 15 |
# File 'lib/kontena/plugin/cloud/image/common.rb', line 13 def image_distribution_url ENV['KONTENA_IMAGES_URL'] || 'https://images.kontena.io' end |
#image_registry_client ⇒ Object
5 6 7 |
# File 'lib/kontena/plugin/cloud/image/common.rb', line 5 def image_registry_client @compute_client ||= Kontena::Client.new(image_registry_url, config.current_account.token, prefix: '/') end |
#image_registry_url ⇒ Object
9 10 11 |
# File 'lib/kontena/plugin/cloud/image/common.rb', line 9 def image_registry_url ENV['KONTENA_IMAGE_REGISTRY_URL'] || 'https://image-registry.kontena.io' end |