nex_client 0.11.0 → 0.12.0

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: 1adedef202faa3b3708d8ddef5f23ca366e6f46b
4
- data.tar.gz: cca86cabe36af8d1a17e5168ba70a09bc2c59723
3
+ metadata.gz: 15ebf0a5c81f16a7120e2b3c916c72b1ce6ed859
4
+ data.tar.gz: 1163c034dec77183d99efddb20d2d40d2c2941dc
5
5
  SHA512:
6
- metadata.gz: 9e800785f3a84c6f20a84404a9e78b9f45b589e40464b3cff53c574895f5141d14349f763ba1387caca509802c9ceee05bbe69516ca6e21f702e251c972f87ec
7
- data.tar.gz: 6f4ac9c0027199406a5a1765b3edbedd456e111d35ffeef198ded12ce099d0d6b39c85f069ecb5d512cdbf16014d6d87b62a806a16f1aabe60b5ae786b557152
6
+ metadata.gz: b1125e3402abca995c63030136e73779489f09c71ccb1bd7f9409a9938c1fbe0f979b8bdde12b23fb30d87f0dbcc1da942ddc84822b6d8e24543e86bd240726a
7
+ data.tar.gz: 41e4b4c6b438b2870a2eb7ad1ab0876afb63d5437ff6c74c9aefc1e249347fec49f3c8eb20b827a5b5cb245e3a5adf483145d53fcfe153c16a1d42e06283709d
data/README.md CHANGED
@@ -15,6 +15,11 @@ You can install the gem by running:
15
15
  gem install nex_client
16
16
  ```
17
17
 
18
+ or update an existing version by running
19
+ ```bash
20
+ gem update nex_client
21
+ ```
22
+
18
23
  ## Getting started with the cli
19
24
 
20
25
  Configure your environment and get started with the tool
@@ -106,13 +106,14 @@ module NexClient
106
106
  c.example 'list all active apps for owner myorg', 'nex-cli apps --owner myorg'
107
107
  c.example 'list all my terminated apps', 'nex-cli apps --status terminated'
108
108
  c.example 'list all terminated apps for owner myorg', 'nex-cli apps --status terminated --owner myorg'
109
+ c.example 'list all apps tagged ruby and rails', 'nex-cli apps --tags ruby,rails'
109
110
  c.option '--all', 'list all apps (no filtering)'
110
111
  c.option '--status <active|terminated>', String, 'list all apps in a given status'
111
112
  c.option '--ssl', 'list all apps with SSL enabled'
112
113
  c.option '--storage', 'list all apps with persistent storage'
113
114
  c.option '--owner HANDLE', 'list all apps for the specified owner'
114
115
  c.option '--image IMAGE', 'list the app with this image'
115
-
116
+ c.option '--tags TAG_LIST', Array, 'comma separated list of tags to filter on'
116
117
  c.action do |args, options|
117
118
  NexClient::Commands::Apps.list(args,options)
118
119
  end
@@ -130,6 +131,8 @@ module NexClient
130
131
  c.option '--size SIZE', Integer, 'specify container size (default: 2, min: 1, max: 20). Container will have N shares of CPU and N*128M of memory.'
131
132
  c.option '--storage', 'enable persistent storage (/!\ only one node allowed)'
132
133
  c.option '--owner ORGANIZATION_HANDLE', 'specify an organisation as owner (organization admin only)'
134
+ c.option '--desc DESCRIPTION', String, 'description for this application (140 characters max)'
135
+ c.option '--tags TAG_LIST', Array, 'comma separated list of tags describing this app'
133
136
  c.action do |args, options|
134
137
  NexClient::Commands::Apps.create(args,options)
135
138
  end
@@ -240,6 +243,8 @@ module NexClient
240
243
  c.description = 'Update application settings'
241
244
  c.example 'change container size to 4', 'nex-cli apps:update myapp --size 4'
242
245
  c.option '--size SIZE', Integer, 'change container size (default: 2, min: 1, max: 20). Container will have N shares of CPU and N*128M of memory.'
246
+ c.option '--desc DESCRIPTION', String, 'update the application description'
247
+ c.option '--tags TAG_LIST', String, 'comma separated list of tags to use to describe the app'
243
248
  c.action do |args, options|
244
249
  NexClient::Commands::Apps.update(args,options)
245
250
  end
@@ -8,7 +8,7 @@ module NexClient
8
8
 
9
9
  SCALING_DIRECTIONS = [:up,:down]
10
10
  APPS_TITLE = "App Details".colorize(:green)
11
- APPS_HEADERS = ['name','status','image','ssl','storage','preferred region','size','nodes','owner'].map(&:upcase)
11
+ APPS_HEADERS = ['name','status','image','ssl','storage','preferred region','size','nodes','owner','description','tags'].map(&:upcase)
12
12
 
13
13
  VARS_TITLE = "Environment Variables".colorize(:blue)
14
14
  VARS_HEADERS = ['key','value'].map(&:upcase)
@@ -23,6 +23,7 @@ module NexClient
23
23
  filters[:persistent_storage] = opts.storage if opts.storage.present?
24
24
  filters[:'owner.handle'] = opts.owner || '@self'
25
25
  filters[:image] = opts.image if opts.image.present?
26
+ filters[:tags] = opts.tags if opts.tags.present?
26
27
 
27
28
  # All option
28
29
  filters = {} if opts.all
@@ -103,6 +104,8 @@ module NexClient
103
104
  attrs[:ssl_enabled] = !opts.no_ssl if opts.no_ssl.present?
104
105
  attrs[:persistent_storage] = opts.storage if opts.storage.present?
105
106
  attrs[:container_size] = opts.size if opts.size.present?
107
+ attrs[:description] = opts.desc if opts.desc.present?
108
+ attrs[:tag_list] = opts.tags if opts.tags.present?
106
109
 
107
110
  # Env variables via command line
108
111
  if opts.env.present?
@@ -160,6 +163,8 @@ module NexClient
160
163
  # Attributes
161
164
  attrs = {}
162
165
  attrs[:container_size] = opts.size if opts.size.present?
166
+ attrs[:description] = opts.desc if opts.desc.present?
167
+ attrs[:tag_list] = opts.tags if opts.tags.present?
163
168
 
164
169
  # Update
165
170
  e.update_attributes(attrs)
@@ -395,7 +400,9 @@ module NexClient
395
400
  record.preferred_region,
396
401
  record.container_size,
397
402
  node_count,
398
- owner
403
+ owner,
404
+ record.description,
405
+ (record.tag_list || []).join(',')
399
406
  ]
400
407
  end
401
408
 
@@ -1,3 +1,3 @@
1
1
  module NexClient
2
- VERSION ||= '0.11.0'
2
+ VERSION ||= '0.12.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nex_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Lachaume