kontena-plugin-upcloud 0.3.1.rc1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa71abdd5e6d879f8868bfb1e14f669a5879d197
4
- data.tar.gz: 35cd56ca6f880a201813cfc4ed2724c01a84cbd8
3
+ metadata.gz: 42158d7b20762b2f956465d59eb2660cb64ba906
4
+ data.tar.gz: a930e55d552400cf1f2f948523bcd76ff4de1263
5
5
  SHA512:
6
- metadata.gz: 5c82aabaaa2c8b6f97d0ad708590e67178aede22b22955d8e1aa7c4320951b7c3b1ea730dafc7a019bb7176aed4f46905439685a4837be72bc8551d2d60fa8a3
7
- data.tar.gz: 0791e9666f8b9fad40fb3b6558046b1c4cbd0004cc0fc5e9772f841db61aa33c5b22356a1d6e7e13d6c770a4ab897459ba2834c10d190fe202c93e06feea3082
6
+ metadata.gz: d22b10f7f99ee78629290b8aadde6aa5b9363fb6367e0d9b50d883368c2a003baae60ac7c386fe5dabad2f019d9f55fbb7cc788c8621ba21bfd5531b10fda2be
7
+ data.tar.gz: f688a5253d5ff2d17791b57853c965c70cafccee5bda7945cd2c2b41aeefd0a86401337fbab5d20a9e59990e40559f53ba2eaa1de6da7fa346214a6baa772974
@@ -1,4 +1,3 @@
1
- require 'securerandom'
2
1
  require 'kontena/plugin/upcloud/prompts'
3
2
 
4
3
  module Kontena::Plugin::Upcloud::Master
@@ -15,10 +14,11 @@ module Kontena::Plugin::Upcloud::Master
15
14
  option "--mongodb-uri", "URI", "External MongoDB uri (optional)"
16
15
 
17
16
  def execute
18
- require_relative '../../../machine/upcloud'
19
-
20
17
  abort_unless_api_access
21
18
 
19
+ require 'securerandom'
20
+ require 'kontena/machine/upcloud'
21
+
22
22
  provisioner.run!(
23
23
  name: self.name,
24
24
  ssh_key: ssh_key,
@@ -1,9 +1,3 @@
1
- require_relative 'master/create_command'
2
-
3
1
  class Kontena::Plugin::Upcloud::MasterCommand < Kontena::Command
4
-
5
- subcommand "create", "Create a new master to Upcloud", Kontena::Plugin::Upcloud::Master::CreateCommand
6
-
7
- def execute
8
- end
2
+ subcommand "create", "Create a new master to Upcloud", load_subcommand('kontena/plugin/upcloud/master/create_command')
9
3
  end
@@ -1,13 +1,5 @@
1
- require_relative 'nodes/create_command'
2
- require_relative 'nodes/restart_command'
3
- require_relative 'nodes/terminate_command'
4
-
5
1
  class Kontena::Plugin::Upcloud::NodeCommand < Kontena::Command
6
-
7
- subcommand "create", "Create a new node to Upcloud", Kontena::Plugin::Upcloud::Nodes::CreateCommand
8
- subcommand "restart", "Restart Upcloud node", Kontena::Plugin::Upcloud::Nodes::RestartCommand
9
- subcommand "terminate", "Terminate Upcloud node", Kontena::Plugin::Upcloud::Nodes::TerminateCommand
10
-
11
- def execute
12
- end
2
+ subcommand "create", "Create a new node to Upcloud", load_subcommand('kontena/plugin/upcloud/nodes/create_command')
3
+ subcommand "restart", "Restart Upcloud node", load_subcommand('kontena/plugin/upcloud/nodes/restart_command')
4
+ subcommand "terminate", "Terminate Upcloud node", load_subcommand('kontena/plugin/upcloud/nodes/terminate_command')
13
5
  end
@@ -14,10 +14,10 @@ module Kontena::Plugin::Upcloud::Nodes
14
14
  requires_current_master_token
15
15
 
16
16
  def execute
17
- require_relative '../../../machine/upcloud'
18
17
 
19
18
  abort_unless_api_access
20
19
 
20
+ require 'kontena/machine/upcloud'
21
21
  grid = fetch_grid
22
22
  provisioner = Kontena::Machine::Upcloud::NodeProvisioner.new(client, username, password)
23
23
  provisioner.run!(
@@ -1,4 +1,5 @@
1
1
  require 'kontena/plugin/upcloud/prompts'
2
+
2
3
  module Kontena::Plugin::Upcloud::Nodes
3
4
  class TerminateCommand < Kontena::Command
4
5
  include Kontena::Cli::Common
@@ -13,7 +14,8 @@ module Kontena::Plugin::Upcloud::Nodes
13
14
 
14
15
  def execute
15
16
  abort_unless_api_access
16
- require_relative '../../../machine/upcloud'
17
+
18
+ require 'kontena/machine/upcloud'
17
19
  confirm_command(name) unless forced?
18
20
  grid = client.get("grids/#{current_grid}")
19
21
  destroyer = Kontena::Machine::Upcloud::NodeDestroyer.new(client, username, password)
@@ -1,7 +1,7 @@
1
1
  module Kontena
2
2
  module Plugin
3
3
  module Upcloud
4
- VERSION = "0.3.1.rc1"
4
+ VERSION = "0.3.1"
5
5
  end
6
6
  end
7
7
  end
@@ -1,11 +1,4 @@
1
- require_relative 'upcloud/master_command'
2
- require_relative 'upcloud/node_command'
3
-
4
1
  class Kontena::Plugin::UpcloudCommand < Kontena::Command
5
-
6
- subcommand 'master', 'Upcloud master related commands', Kontena::Plugin::Upcloud::MasterCommand
7
- subcommand 'node', 'Upcloud node related commands', Kontena::Plugin::Upcloud::NodeCommand
8
-
9
- def execute
10
- end
2
+ subcommand 'master', 'Upcloud master related commands', load_subcommand('kontena/plugin/upcloud/master_command')
3
+ subcommand 'node', 'Upcloud node related commands', load_subcommand('kontena/plugin/upcloud/node_command')
11
4
  end
@@ -1,5 +1,5 @@
1
1
  require 'kontena_cli'
2
- require_relative 'kontena/plugin/upcloud'
3
- require_relative 'kontena/plugin/upcloud_command'
2
+ require 'kontena/plugin/upcloud'
3
+ require 'kontena/cli/subcommand_loader'
4
4
 
5
- Kontena::MainCommand.register("upcloud", "Upcloud specific commands", Kontena::Plugin::UpcloudCommand)
5
+ Kontena::MainCommand.register("upcloud", "Upcloud specific commands", Kontena::Cli::SubcommandLoader.new('kontena/plugin/upcloud_command'))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kontena-plugin-upcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1.rc1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kontena, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-07 00:00:00.000000000 Z
11
+ date: 2017-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kontena-cli
@@ -99,9 +99,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ">"
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
- version: 1.3.1
104
+ version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
107
  rubygems_version: 2.4.5