kitchen-joyent 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cdddcc9d9b8dbc4e5e0cd5122911ad74c6f924c
4
- data.tar.gz: 8841635f4ff25fa656f24ae1aa6598809c4d6960
3
+ metadata.gz: 17150f45297853ee4ce3fc3fe3bc45fb56c147d6
4
+ data.tar.gz: 544dff8f6217b29abeddf1dada5b74d96adb2a66
5
5
  SHA512:
6
- metadata.gz: 8240fd9d670c4d3ec0470c9317f79982893e04cb2b313eab4097f07e1db84131e52e8471b459b6436ad7f4df0d5141ddf7c1688a529b0dec1a16bd63a468998f
7
- data.tar.gz: c759a4aeb60051d8f3f3d6e684b8701a92eaeed6b21dd9809192b2f987eed6e68f9add5a2e67de2de5e5d3ecc5bf8415624e1828a3df1296001224ee494de53c
6
+ metadata.gz: e6c3d39da70ff3764ab0f279505a447f0bdb7ee6c7ec7eb29d93d6d296a526440cef8312dcca494dbccff4b06f3e707e4d7d12b9fedfb751fedb06e55bfaa729
7
+ data.tar.gz: 20e69c3c9ab1ea9a784ae3e06d2a746fb508f828487217a9f263a41082e748a0c20753e09d910a0a03d9c341acffa659b6d0f85810355ec512aa1f5baa169b5b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ v0.2.1 (2015-03-10)
2
+ -------------------
3
+ - Dropping invalid characters for joyent_image_name
4
+ - Allowing API version to be specified
5
+
1
6
  v0.2.0 (2015-03-02)
2
7
  -------------------
3
8
  - Allow self-signed certificate on server via joyent_ssl_verify_peer
data/README.md CHANGED
@@ -33,31 +33,36 @@ to override the Chef bootstrap script.
33
33
  chef_omnibus_url: http://path.to.an.script.sh
34
34
 
35
35
  ## Optional Attributes
36
- Under `platforms` section:
37
-
38
- driver_config:
39
- # Allow self-signed certs.
40
- #
41
- joyent_ssl_verify_peer: false
42
-
43
- # For additional nics
44
- #
45
- joyent_networks:
46
- - d2ba0f30-bbe8-11e2-a9a2-6bc116856d85
47
- - a3a84a44-766c-407e-9233-9a45ebcd579f
48
-
49
- # For images without a default network (will throw error if invalid)
50
- # NOTE: Don't use 'joyent_networks' if using this attribute.
51
- #
52
- joyent_default_networks:
53
- - d2ba0f30-bbe8-11e2-a9a2-6bc116856d85
54
- - a3a84a44-766c-407e-9233-9a45ebcd579f
55
-
56
- Under `suites` section:
36
+ Under the general `driver_config`:
37
+ ````
38
+ # Specify Joyent API version
39
+ joyent_version: '~7.0'
40
+
41
+ # Allow self-signed certs.
42
+ joyent_ssl_verify_peer: false
43
+ ````
44
+ Usually under `platforms` section:
45
+ ````
46
+ driver_config:
57
47
 
58
- driver_config:
59
- joyent_image_name: default01
48
+ # For additional nics
49
+ # NOTE: Requires Joyent API version >= 7.0
50
+ joyent_networks:
51
+ - d2ba0f30-bbe8-11e2-a9a2-6bc116856d85
52
+ - a3a84a44-766c-407e-9233-9a45ebcd579f
53
+
54
+ # Where to pull IP's from by default (internal/external)
55
+ joyent_default_networks:
56
+ - internal
57
+ ```
58
+ Usually under `suites` section:
59
+ ```
60
+ driver_config:
60
61
 
62
+ # Friendly machine name
63
+ # Valid Chracters =~ /0-9A-Za-z\.-/
64
+ joyent_image_name: default01
65
+ ```
61
66
  # Example .kitchen.yml
62
67
 
63
68
  ```
@@ -32,6 +32,7 @@ module Kitchen
32
32
  default_config :joyent_image_id, '87b9f4ac-5385-11e3-a304-fb868b82fe10'
33
33
  default_config :joyent_image_name, ''
34
34
  default_config :joyent_flavor_id, 'g3-standard-4-smartos'
35
+ default_config :joyent_version, '~6.5'
35
36
  default_config :joyent_networks, []
36
37
  default_config :joyent_default_networks, []
37
38
  default_config :joyent_ssl_verify_peer, true
@@ -75,6 +76,7 @@ module Kitchen
75
76
  joyent_keyname: config[:joyent_keyname],
76
77
  joyent_keyfile: config[:joyent_keyfile],
77
78
  joyent_url: config[:joyent_url],
79
+ joyent_version: config[:joyent_version],
78
80
  connection_options: {
79
81
  ssl_verify_peer: config[:joyent_ssl_verify_peer],
80
82
  },
@@ -89,12 +91,16 @@ module Kitchen
89
91
  compute_def = {
90
92
  dataset: config[:joyent_image_id],
91
93
  package: config[:joyent_flavor_id],
92
- name: config[:joyent_image_name],
94
+ name: config[:joyent_image_name].gsub!(/_/, '-').gsub!(/[^0-9A-Za-z\.-]/, ''),
93
95
  }
94
96
 
97
+ # Requires "joyent_version" >= 7.0
95
98
  if config[:joyent_networks].any?
96
99
  compute_def[:networks] = config[:joyent_networks]
97
- elsif config[:joyent_default_networks].any?
100
+ end
101
+
102
+ # "internal" and/or "external"
103
+ if config[:joyent_default_networks].any?
98
104
  compute_def[:default_networks] = config[:joyent_default_networks]
99
105
  end
100
106
 
@@ -105,6 +111,7 @@ module Kitchen
105
111
  debug("joyent: joyent_url #{config[:joyent_url]}")
106
112
  debug("joyent: image_id #{config[:joyent_image_id]}")
107
113
  debug("joyent: flavor_id #{config[:joyent_flavor_id]}")
114
+ debug("joyent: version #{config[:joyent_version]}")
108
115
 
109
116
  unless config[:joyent_image_name].length == 0
110
117
  debug("joyent: image_name #{config[:joyent_image_name]}")
@@ -20,6 +20,6 @@ module Kitchen
20
20
  # Kitchen
21
21
  module Driver
22
22
  # Version string for Joyent Kitchen provider
23
- JOYENT_VERSION = '0.2.0'
23
+ JOYENT_VERSION = '0.2.1'
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-joyent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean OMeara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-02 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen