kontena-plugin-upcloud 0.3.1 → 0.3.2

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
- SHA1:
3
- metadata.gz: 42158d7b20762b2f956465d59eb2660cb64ba906
4
- data.tar.gz: a930e55d552400cf1f2f948523bcd76ff4de1263
2
+ SHA256:
3
+ metadata.gz: 71aab2eedebd591293ef7c0b420688be2b23511796b78e09848184f139642f94
4
+ data.tar.gz: 1947a0745470ca7a80d87203ffaa815c151563f7c4a85bbed31affa2b6d1be67
5
5
  SHA512:
6
- metadata.gz: d22b10f7f99ee78629290b8aadde6aa5b9363fb6367e0d9b50d883368c2a003baae60ac7c386fe5dabad2f019d9f55fbb7cc788c8621ba21bfd5531b10fda2be
7
- data.tar.gz: f688a5253d5ff2d17791b57853c965c70cafccee5bda7945cd2c2b41aeefd0a86401337fbab5d20a9e59990e40559f53ba2eaa1de6da7fa346214a6baa772974
6
+ metadata.gz: 524606de9030b34429a97a134fd851a08c04bd15188fdcbd34cc0394ed211245018d0e21bc02e17c5e796904aa0cfed9fd0acab21d79c2805993cf8781a98b01
7
+ data.tar.gz: 42404e3deb08eab0901b9858e92b1b174ea3f57497c5884a7b57baa0fd0e2a8773d9a47739858b762ba6e3ffd7f59cd7e1de06250365dd376879e38adf24e2c4
@@ -109,9 +109,12 @@ module Kontena
109
109
  ERB.new(template).result(OpenStruct.new(vars).instance_eval { binding })
110
110
  end
111
111
 
112
+ # @param [Hash] node
113
+ # @param [Array<String>] labels
112
114
  def set_labels(node, labels)
113
- data = {labels: labels}
114
- api_client.put("nodes/#{node['grid']['id']}/#{node['id']}", data)
115
+ data = {}
116
+ data[:labels] = labels
117
+ api_client.put("nodes/#{node['id']}", data)
115
118
  end
116
119
  end
117
120
  end
@@ -1,7 +1,7 @@
1
1
  module Kontena
2
2
  module Plugin
3
3
  module Upcloud
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
6
6
  end
7
7
  end
@@ -27,7 +27,7 @@ module Kontena::Plugin::Upcloud::Nodes
27
27
  end
28
28
 
29
29
  def default_password
30
- prompt.ask('UpCloud password:', echo: false)
30
+ prompt.mask('UpCloud password:')
31
31
  end
32
32
 
33
33
  def default_name
@@ -27,7 +27,7 @@ module Kontena
27
27
  end
28
28
 
29
29
  def default_password
30
- pass = prompt.ask('UpCloud password:', echo: false)
30
+ pass = prompt.mask('UpCloud password:')
31
31
  end
32
32
  end
33
33
  end
@@ -66,7 +66,7 @@ module Kontena
66
66
  end
67
67
 
68
68
  def ssh_key
69
- return File.read(ssh_key_path) unless ssh_key_path.nil?
69
+ return File.read(ssh_key_path).strip unless ssh_key_path.nil?
70
70
  default = File.read(Defaults::DEFAULT_SSH_KEY_PATH).strip rescue nil
71
71
  prompt.ask('SSH public key: (enter an ssh key in OpenSSH format "ssh-xxx xxxxx key_name")', default: default) do |q|
72
72
  q.validate /^ssh-rsa \S+ \S+$/
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
4
+ version: 0.3.2
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-09 00:00:00.000000000 Z
11
+ date: 2017-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kontena-cli
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.4.5
107
+ rubygems_version: 2.7.3
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Kontena Upcloud plugin