ogre 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +20 -0
  4. data/.rubocop.yml +16 -0
  5. data/.travis.yml +3 -0
  6. data/Gemfile +4 -0
  7. data/README.md +102 -0
  8. data/Rakefile +18 -0
  9. data/bin/ogre +4 -0
  10. data/lib/ogre.rb +44 -0
  11. data/lib/ogre/associate.rb +57 -0
  12. data/lib/ogre/base.rb +21 -0
  13. data/lib/ogre/config.rb +18 -0
  14. data/lib/ogre/messages.rb +84 -0
  15. data/lib/ogre/org-create.rb +96 -0
  16. data/lib/ogre/org-delete.rb +29 -0
  17. data/lib/ogre/runner.rb +40 -0
  18. data/lib/ogre/set-private-key.rb +57 -0
  19. data/lib/ogre/skeletons/code_generator/files/default/chefignore +95 -0
  20. data/lib/ogre/skeletons/code_generator/files/default/cookbook_readmes/README-policy.md +9 -0
  21. data/lib/ogre/skeletons/code_generator/files/default/cookbook_readmes/README.md +54 -0
  22. data/lib/ogre/skeletons/code_generator/files/default/gitignore +16 -0
  23. data/lib/ogre/skeletons/code_generator/files/default/repo/README.md +66 -0
  24. data/lib/ogre/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb +7 -0
  25. data/lib/ogre/skeletons/code_generator/files/default/repo/cookbooks/example/metadata.rb +3 -0
  26. data/lib/ogre/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb +8 -0
  27. data/lib/ogre/skeletons/code_generator/files/default/repo/data_bags/README.md +58 -0
  28. data/lib/ogre/skeletons/code_generator/files/default/repo/data_bags/example/example_item.json +4 -0
  29. data/lib/ogre/skeletons/code_generator/files/default/repo/environments/README.md +9 -0
  30. data/lib/ogre/skeletons/code_generator/files/default/repo/environments/_default.json +9 -0
  31. data/lib/ogre/skeletons/code_generator/files/default/repo/environments/dev.json +21 -0
  32. data/lib/ogre/skeletons/code_generator/files/default/repo/environments/example.json +13 -0
  33. data/lib/ogre/skeletons/code_generator/files/default/repo/environments/int.json +21 -0
  34. data/lib/ogre/skeletons/code_generator/files/default/repo/environments/prod.json +21 -0
  35. data/lib/ogre/skeletons/code_generator/files/default/repo/environments/qa.json +21 -0
  36. data/lib/ogre/skeletons/code_generator/files/default/repo/environments/stage.json +21 -0
  37. data/lib/ogre/skeletons/code_generator/files/default/repo/roles/README.md +9 -0
  38. data/lib/ogre/skeletons/code_generator/files/default/repo/roles/active-base.json +12 -0
  39. data/lib/ogre/skeletons/code_generator/files/default/repo/roles/example.json +13 -0
  40. data/lib/ogre/skeletons/code_generator/files/default/repo/roles/loc_caeast.json +13 -0
  41. data/lib/ogre/skeletons/code_generator/files/default/repo/roles/loc_canada.json +13 -0
  42. data/lib/ogre/skeletons/code_generator/files/default/repo/roles/loc_cawest.json +13 -0
  43. data/lib/ogre/skeletons/code_generator/files/default/repo/roles/loc_useast.json +13 -0
  44. data/lib/ogre/skeletons/code_generator/files/default/repo/roles/loc_uswest.json +13 -0
  45. data/lib/ogre/skeletons/code_generator/metadata.rb +8 -0
  46. data/lib/ogre/skeletons/code_generator/recipes/repo.rb +52 -0
  47. data/lib/ogre/skeletons/code_generator/templates/default/LICENSE.all_rights.erb +3 -0
  48. data/lib/ogre/skeletons/code_generator/templates/default/LICENSE.apache2.erb +201 -0
  49. data/lib/ogre/skeletons/code_generator/templates/default/LICENSE.gplv2.erb +339 -0
  50. data/lib/ogre/skeletons/code_generator/templates/default/LICENSE.gplv3.erb +674 -0
  51. data/lib/ogre/skeletons/code_generator/templates/default/LICENSE.mit.erb +21 -0
  52. data/lib/ogre/skeletons/code_generator/templates/default/README.md.erb +4 -0
  53. data/lib/ogre/skeletons/code_generator/templates/default/cookbook_file.erb +0 -0
  54. data/lib/ogre/skeletons/code_generator/templates/default/knife.rb.erb +44 -0
  55. data/lib/ogre/skeletons/code_generator/templates/default/metadata.rb.erb +8 -0
  56. data/lib/ogre/skeletons/code_generator/templates/default/repo/gitignore.erb +11 -0
  57. data/lib/ogre/user-create.rb +40 -0
  58. data/lib/ogre/user-delete.rb +39 -0
  59. data/lib/ogre/version.rb +5 -0
  60. data/ogre.gemspec +45 -0
  61. data/spec/fixtures/client_key/dummy.pem +27 -0
  62. data/spec/fixtures/vcr_cassettes/associate-no-org.yml +65 -0
  63. data/spec/fixtures/vcr_cassettes/associate-no-user.yml +65 -0
  64. data/spec/fixtures/vcr_cassettes/associate-user-exists.yml +135 -0
  65. data/spec/fixtures/vcr_cassettes/associate.yml +406 -0
  66. data/spec/fixtures/vcr_cassettes/org-create-exists.yml +69 -0
  67. data/spec/fixtures/vcr_cassettes/org-create.yml +71 -0
  68. data/spec/fixtures/vcr_cassettes/org-delete-no-org.yml +61 -0
  69. data/spec/fixtures/vcr_cassettes/org-delete.yml +68 -0
  70. data/spec/fixtures/vcr_cassettes/set-private-key.yml +239 -0
  71. data/spec/fixtures/vcr_cassettes/user-create-bad-email.yml +66 -0
  72. data/spec/fixtures/vcr_cassettes/user-create-exists.yml +70 -0
  73. data/spec/fixtures/vcr_cassettes/user-create-short-password.yml +66 -0
  74. data/spec/fixtures/vcr_cassettes/user-create.yml +72 -0
  75. data/spec/fixtures/vcr_cassettes/user-delete-not-found.yml +61 -0
  76. data/spec/fixtures/vcr_cassettes/user-delete.yml +136 -0
  77. data/spec/ogre/associate_spec.rb +67 -0
  78. data/spec/ogre/org-create_spec.rb +52 -0
  79. data/spec/ogre/org-delete_spec.rb +34 -0
  80. data/spec/ogre/set-private-key_spec.rb +16 -0
  81. data/spec/ogre/user-create_spec.rb +58 -0
  82. data/spec/ogre/user-delete_spec.rb +34 -0
  83. data/spec/spec_helper.rb +16 -0
  84. metadata +349 -0
@@ -0,0 +1,71 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://chef.server/organizations
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: '{"name":"my-org-name","full_name":"my-org-desc"}'
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ X-Ops-Sign:
17
+ - algorithm=sha1;version=1.0;
18
+ X-Ops-Userid: pivotal
19
+ X-Ops-Timestamp:
20
+ - '2015-04-27T16:24:27Z'
21
+ X-Ops-Content-Hash:
22
+ - "{{X-Ops-Content-Hash}}"
23
+ X-Ops-Authorization-1:
24
+ - "{{X-Ops-Authorization-1}}"
25
+ X-Ops-Authorization-2:
26
+ - "{{X-Ops-Authorization-2}}"
27
+ X-Ops-Authorization-3:
28
+ - "{{X-Ops-Authorization-3}}"
29
+ X-Ops-Authorization-4:
30
+ - "{{X-Ops-Authorization-4}}"
31
+ X-Ops-Authorization-5:
32
+ - "{{X-Ops-Authorization-5}}"
33
+ X-Ops-Authorization-6:
34
+ - "{{X-Ops-Authorization-6}}"
35
+ Host:
36
+ - chef.server:443
37
+ X-Remote-Request-Id:
38
+ - fb8dd801-3085-421a-be65-16254c897411
39
+ Content-Length:
40
+ - '48'
41
+ X-Chef-Version:
42
+ - 12.2.1
43
+ User-Agent:
44
+ - ruby
45
+ response:
46
+ status:
47
+ code: 201
48
+ message: Created
49
+ headers:
50
+ Server:
51
+ - ngx_openresty/1.4.3.6
52
+ Date:
53
+ - Mon, 27 Apr 2015 16:24:19 GMT
54
+ Content-Type:
55
+ - application/json
56
+ Content-Length:
57
+ - '1813'
58
+ Connection:
59
+ - keep-alive
60
+ X-Ops-Api-Info:
61
+ - flavor=cs;version=12.0.0;oc_erchef=1.5.0
62
+ Location:
63
+ - https://chef.server/organizations/undefined/clients/my-org-name-validator
64
+ body:
65
+ encoding: UTF-8
66
+ string: '{"uri":"https://chef.server/organizations/my-org-name","clientname":"my-org-name-validator","private_key":"-----BEGIN
67
+ RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEA17mQqeTDqdT1ZPJVwP7mJo0wHxc1ta++ZWBusHPMLLhfalDY\n7GWizERZRSjtcNxQDBuCfzjlvpBhpsh6rFV1/FaJ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p9UfXU\nCE0PDPrfkfjYDq4G6Jk+snLVS16fitUXM2RM7jNGD411n2xwwlnGyRy4ickVvhWd\nnqZpv6ck0ZblDbGSa7J5k7kCgYEAkN2mOVXDab5VxCUeT50SDGChiPxnJjTLovub\nkpSPSn3KAU2SkKXKuIUuuE1An3XIX/GPq0vUgcVp10xIypeT5KN2qhs9Vl9rlxRM\nS6KSeYSN1xGcsNFrlF8CXbz3XWD5q/ew5oGIZFADRoc7kWtIjUN2xzkDfVnSaW82\nyIRVjqUCgYA0CYfZcg9r5QsY7IAqMnjaxB6WYvvRveDE8ynBmRuM63t6p3080uNe\nEjtGPdK2maK43FZX1MlWIKXKxycI0ws8DUBT84gOje/7vAjVrnItgDpgJMMGjL8q\npYTVs/BzAaFx4Flx8IftzsWHx8bQeNxIyGRs3RcYTmziFdnBDqnoAQ==\n-----END
68
+ RSA PRIVATE KEY-----"}'
69
+ http_version:
70
+ recorded_at: Mon, 27 Apr 2015 16:24:29 GMT
71
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://chef.server/organizations/my-nonexistent-org
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ X-Ops-Sign:
15
+ - algorithm=sha1;version=1.0;
16
+ X-Ops-Userid: pivotal
17
+ X-Ops-Timestamp:
18
+ - '2015-04-29T19:18:50Z'
19
+ X-Ops-Content-Hash:
20
+ - "{{X-Ops-Content-Hash}}"
21
+ X-Ops-Authorization-1:
22
+ - "{{X-Ops-Authorization-1}}"
23
+ X-Ops-Authorization-2:
24
+ - "{{X-Ops-Authorization-2}}"
25
+ X-Ops-Authorization-3:
26
+ - "{{X-Ops-Authorization-3}}"
27
+ X-Ops-Authorization-4:
28
+ - "{{X-Ops-Authorization-4}}"
29
+ X-Ops-Authorization-5:
30
+ - "{{X-Ops-Authorization-5}}"
31
+ X-Ops-Authorization-6:
32
+ - "{{X-Ops-Authorization-6}}"
33
+ Host:
34
+ - chef.server:443
35
+ X-Remote-Request-Id:
36
+ - 7c54cdc8-4edc-4b76-b51f-63e14886c0b1
37
+ X-Chef-Version:
38
+ - 12.3.0
39
+ User-Agent:
40
+ - Chef Client/12.3.0 (ruby-2.1.4-p265; ohai-8.2.0; x86_64-darwin12.0; +http://opscode.com)
41
+ response:
42
+ status:
43
+ code: 404
44
+ message: Object Not Found
45
+ headers:
46
+ Server:
47
+ - ngx_openresty/1.4.3.6
48
+ Date:
49
+ - Wed, 29 Apr 2015 19:18:49 GMT
50
+ Content-Length:
51
+ - '63'
52
+ Connection:
53
+ - keep-alive
54
+ X-Ops-Api-Info:
55
+ - flavor=cs;version=12.0.0;oc_erchef=1.5.0
56
+ body:
57
+ encoding: UTF-8
58
+ string: '{"error":["organization ''my-nonexistent-org'' does not exist."]}'
59
+ http_version:
60
+ recorded_at: Wed, 29 Apr 2015 19:18:50 GMT
61
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://chef.server/organizations/my-org-name
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ X-Ops-Sign:
15
+ - algorithm=sha1;version=1.0;
16
+ X-Ops-Userid: pivotal
17
+ X-Ops-Timestamp:
18
+ - '2015-04-27T19:25:35Z'
19
+ X-Ops-Content-Hash:
20
+ - "{{X-Ops-Content-Hash}}"
21
+ X-Ops-Authorization-1:
22
+ - "{{X-Ops-Authorization-1}}"
23
+ X-Ops-Authorization-2:
24
+ - "{{X-Ops-Authorization-2}}"
25
+ X-Ops-Authorization-3:
26
+ - "{{X-Ops-Authorization-3}}"
27
+ X-Ops-Authorization-4:
28
+ - "{{X-Ops-Authorization-4}}"
29
+ X-Ops-Authorization-5:
30
+ - "{{X-Ops-Authorization-5}}"
31
+ X-Ops-Authorization-6:
32
+ - "{{X-Ops-Authorization-6}}"
33
+ Host:
34
+ - chef.server:443
35
+ X-Remote-Request-Id:
36
+ - 9e6b5cbf-afe1-45d3-a886-e8f07534b68b
37
+ X-Chef-Version:
38
+ - 12.2.1
39
+ User-Agent:
40
+ - ruby
41
+ response:
42
+ status:
43
+ code: 200
44
+ message: OK
45
+ headers:
46
+ Server:
47
+ - ngx_openresty/1.4.3.6
48
+ Date:
49
+ - Mon, 27 Apr 2015 19:25:25 GMT
50
+ Content-Type:
51
+ - application/json
52
+ Transfer-Encoding:
53
+ - chunked
54
+ Connection:
55
+ - keep-alive
56
+ X-Ops-Api-Info:
57
+ - flavor=cs;version=12.0.0;oc_erchef=1.5.0
58
+ Content-Encoding:
59
+ - gzip
60
+ body:
61
+ encoding: ASCII-8BIT
62
+ string: !binary |-
63
+ H4sIAAAAAAAAA6tWykvMTVWyUsqt1M0vStcF83SU0kpzcuJRZVJSi5OBMuml
64
+ mSlA5YkG5mkGySYmaQZJRpYGRgZpKeZmxilmJuYGFuap5saGSrUAjo0qeVoA
65
+ AAA=
66
+ http_version:
67
+ recorded_at: Mon, 27 Apr 2015 19:25:35 GMT
68
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,239 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://user:password@vco.server:8281/vco/api/workflows?conditions=name=Set-Private-Key
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ X-Ops-Userid: pivotal
17
+ response:
18
+ status:
19
+ code: 200
20
+ message: OK
21
+ headers:
22
+ Server:
23
+ - Apache-Coyote/1.1
24
+ Cache-Control:
25
+ - private
26
+ Expires:
27
+ - Thu, 01 Jan 1970 00:00:00 UTC
28
+ Content-Type:
29
+ - application/json; v=5.1.1;charset=UTF-8
30
+ Transfer-Encoding:
31
+ - chunked
32
+ Date:
33
+ - Mon, 27 Apr 2015 19:39:56 GMT
34
+ body:
35
+ encoding: UTF-8
36
+ string: '{"link":[{"attributes":[{"value":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/","name":"itemHref"},{"value":"some-long-workflow-id","name":"id"},{"value":"Chef","name":"categoryName"},{"value":"true","name":"canExecute"},{"value":"https://vco.server:8281/vco/api/catalog/System/WorkflowCategory/ff808081450a368901451a1076900130/","name":"categoryHref"},{"value":"Adds
37
+ a private key as a configuration item to \"Chef/Chef Private Keys\" for authentication
38
+ purposes.\n\nAll workflows that call the Chef API will read private keys from
39
+ this configuration.\n\nPrivate keys are stored in the Configuration item per
40
+ chef host and userid.\n\nThis workflow can also store validator keys. Userid
41
+ of validator keys would be: <orgname>-validator","name":"description"},{"value":"Set
42
+ Private Key","name":"name"},{"value":"false","name":"customIcon"},{"value":"Workflow","name":"type"},{"value":"true","name":"canEdit"},{"value":"0.0.5","name":"version"}],"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/","rel":"down"}],"total":1}'
43
+ http_version:
44
+ recorded_at: Mon, 27 Apr 2015 19:40:06 GMT
45
+ - request:
46
+ method: get
47
+ uri: https://user:password@vco.server:8281/vco/api/workflows/some-long-workflow-id
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ Accept:
53
+ - application/json
54
+ Accept-Encoding:
55
+ - gzip, deflate
56
+ User-Agent:
57
+ - Ruby
58
+ X-Ops-Userid: pivotal
59
+ response:
60
+ status:
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ Server:
65
+ - Apache-Coyote/1.1
66
+ Cache-Control:
67
+ - private
68
+ Expires:
69
+ - Thu, 01 Jan 1970 00:00:00 UTC
70
+ Content-Type:
71
+ - application/json; v=5.1.1;charset=UTF-8
72
+ Transfer-Encoding:
73
+ - chunked
74
+ Date:
75
+ - Mon, 27 Apr 2015 19:39:58 GMT
76
+ body:
77
+ encoding: UTF-8
78
+ string: '{"relations":{"link":[{"href":"https://vco.server:8281/vco/api/inventory/System/Workflows/Library/Chef/","rel":"up"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/","rel":"executions"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/presentation/","rel":"presentation"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/tasks/","rel":"tasks"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/icon/","rel":"icon"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/schema/","rel":"schema"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/permissions/","rel":"permissions"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/interactions/","rel":"interactions"}]},"id":"some-long-workflow-id","name":"Set-Private-Key","version":"0.0.5","description":"Adds a private key as a configuration
79
+ item to \"Chef/Chef Private Keys\" for authentication purposes.\n\nAll workflows
80
+ that call the Chef API will read private keys from this configuration.\n\nPrivate
81
+ keys are stored in the Configuration item per chef host and userid.\n\nThis
82
+ workflow can also store validator keys. Userid of validator keys would be:
83
+ <orgname>-validator","href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/","customized-icon":false,"input-parameters":[{"type":"string","name":"chefHostname"},{"type":"string","name":"userid"},{"description":"RSA
84
+ Private Key. PKCS#1 PEM format","type":"string","name":"pem"}]}'
85
+ http_version:
86
+ recorded_at: Mon, 27 Apr 2015 19:40:07 GMT
87
+ - request:
88
+ method: get
89
+ uri: https://user:password@vco.server:8281/vco/api/workflows/some-long-workflow-id/presentation/
90
+ body:
91
+ encoding: US-ASCII
92
+ string: ''
93
+ headers:
94
+ Accept:
95
+ - application/json
96
+ Accept-Encoding:
97
+ - gzip, deflate
98
+ User-Agent:
99
+ - Ruby
100
+ X-Ops-Userid: pivotal
101
+ response:
102
+ status:
103
+ code: 200
104
+ message: OK
105
+ headers:
106
+ Server:
107
+ - Apache-Coyote/1.1
108
+ Cache-Control:
109
+ - private
110
+ Expires:
111
+ - Thu, 01 Jan 1970 00:00:00 UTC
112
+ Content-Type:
113
+ - application/json; v=5.1.1;charset=UTF-8
114
+ Transfer-Encoding:
115
+ - chunked
116
+ Date:
117
+ - Mon, 27 Apr 2015 19:39:58 GMT
118
+ body:
119
+ encoding: UTF-8
120
+ string: '{"relations":{"link":[{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/","rel":"up"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/presentation/instances/","rel":"instances"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/presentation/instances/","rel":"add"}]},"steps":[{"step":{"elements":[{"@type":"group","hidden":false,"messages":[],"fields":[{"@type":"field","fields":[],"id":"chefHostname","description":"chefHostname","hidden":false,"messages":[],"decorators":[],"type":"string","constraints":[],"display-name":"chefHostname"},{"@type":"field","fields":[],"id":"userid","description":"userid","hidden":false,"messages":[],"decorators":[],"type":"string","constraints":[],"display-name":"userid"},{"@type":"field","fields":[],"id":"pem","description":"pem","hidden":false,"messages":[],"decorators":[{"@type":"multiline"}],"type":"string","constraints":[],"display-name":"pem"}]}],"hidden":false,"messages":[]}}],"id":"some-long-workflow-id","name":"Set
121
+ Private Key","href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/presentation/","input-parameters":[{"description":"chefHostname","type":"string","name":"chefHostname"},{"description":"userid","type":"string","name":"userid"},{"description":"pem","type":"string","name":"pem"}],"output-parameters":[{"description":"RSA
122
+ Private Key. PKCS#1 PEM format","type":"string","name":"pem"},{"type":"string","name":"chefHostname"},{"type":"string","name":"userid"}]}'
123
+ http_version:
124
+ recorded_at: Mon, 27 Apr 2015 19:40:08 GMT
125
+ - request:
126
+ method: post
127
+ uri: https://user:password@vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/
128
+ body:
129
+ encoding: UTF-8
130
+ string: '{"parameters":[{"type":"string","name":"chefHostname","scope":"local","value":{"string":{"value":"chef.server"}}},{"type":"string","name":"userid","scope":"local","value":{"string":{"value":"org-validator"}}},{"type":"string","name":"pem","scope":"local","value":{"string":{"value":"-----BEGIN
131
+ RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA3SqsHlVmqP6OxcMBZm96sObwGHK3pM7LHl6F8TZ3poPzFgut\nSVt2sBfHQZC2vXIN/lnwlExtixzttgd9F4VkGij5LX/crLZ8JV7he0/+c0Y/slAg\ndqe2AMRNuxAL+s/FpqVnB7iiePIxlA9sDFhsYyHz6QtwzIRAaxnlC/ZWzJCYRHxE\nhIwZMC1oZsPdSc9k5D60vIxJLHwQ/OOIhVjk6h+szS3uRUYpHiyywF09lwaCeKR0\nFqxqSBb5yJv9lzLqhJkhHM6t0y88rNWggwj3nE3YmlCHcp/B81BTbyXT2EpF6mbt\nCQbmDO118YHDDuXGiTuSimGx9oFyw9tMe8Nx/QIBIwKCAQEAl6g7goO0HBxEpN19\nTY5FgJ5bfnqMjkSoidpqeYRvTZxO6ouqBmqah2DDJaUPl9kuKsFUgvKUQiJ3Hbv+\nAYAKIJEf5K9yv5MTTNNYyZXwTwuZZFQzhJBCSast/J1KCxIhIdCBKd2xPP3Y2o47\ndi4BLginQLdjSmlQvngoCDPjv3fRNhvyoTNvKoiCXWFbw+Rnax1UpzAGL1u6JHjE\ndfLfRmJNdnOQVpnfUQ2ELoF6iTTB2/mJsbDcfAmKIGeWmXFa006f1RO3YxS+925t\n/7eoyPEAJ/fRBBzUZrkhoVjGaZXgEgmOw3k3rVQFbixZf0FXQpehwXyE4WCkY3rc\nF1AZawKBgQD6Rq/u9S8xhR9nvibntCqko/jBhqqBD2hhXh+w0WWSZcISLPoKNC1F\nL3ThiuBEm/jRpbxWJtfMNd0jcd4Nad8EoAHDxI7VYfsoYwVm2xnUe5ynAtpReOCC\n2t6xMNdYIy4X+CtkM/1uYFZkGAb3nN1a9ZvQoh1Crb+5pxcIKsYuTwKBgQDiOY4+\nZEc64lxCixmlF/epbrstF2Zpwq3q1D5j3UZ3kw4+/iCxks3TmIQbHFV7naDAx3GK\nd11ciAFCPNGJ4uPsGxoJlthtALXTIPnZPa33plG8B9d6fmqJV/j73a0FBcxHLULt\n9/ixJSc0mM9zmHPMUoKgrhmC1WoetlvDWahz8wKBgQDzIBie/M7CZA/hHx56rwTa\nc2atXj87i090h1H8OSDXW4lTfCYYinUeoyEVnNncP76Cg75FD8pRWOVy46SCDxMp\nEHa+LKgCfHBTHl0E1NdDcMQP9CSJqJ+VDyF47Z392Qg0iq3PDe7gQFPsNJkNy5Uz\nygUT0K61zVspYHzGGuxnfwKBgQCbICcGNiI3AZ5Zg/RT8y17fyFDfcKRqhDbijlp\nDMKbIwJ0VnzRiTyuWfQv2Ooo4R3GBRqoF1X2TqHHBSH4Jo2pNyfMD6pZX5KfZxG5\niWFZXBrKFAF4kTMcWZTJ9xeOamAwzpRLaDWAyQTw3dAUwE9niQkduTYQkldlhFwu\nLtnpGwKBgHblG0jaKbPGeE2QANZ1koiOoOHV007tGunmq/Bv2paRpgn/yzjpU/l8\noLWSvbabIU3ANxu6Ich6OGTikQqo+b+Pi0v5lv66nSb1lZSGk2NIll3SEF4/rmx/\n5ijGogq7y/I62ZoYUy4oZ/tKVQMqIgn3tGJ3sGImxeSwfKzxfLer\n-----END
132
+ RSA PRIVATE KEY-----\n"}}}]}'
133
+ headers:
134
+ Accept:
135
+ - application/json
136
+ Accept-Encoding:
137
+ - gzip, deflate
138
+ Content-Type:
139
+ - application/json
140
+ Content-Length:
141
+ - '2010'
142
+ User-Agent:
143
+ - Ruby
144
+ X-Ops-Userid: pivotal
145
+ response:
146
+ status:
147
+ code: 202
148
+ message: Accepted
149
+ headers:
150
+ Server:
151
+ - Apache-Coyote/1.1
152
+ Location:
153
+ - https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id/
154
+ Content-Length:
155
+ - '0'
156
+ Date:
157
+ - Mon, 27 Apr 2015 19:40:01 GMT
158
+ body:
159
+ encoding: UTF-8
160
+ string: ''
161
+ http_version:
162
+ recorded_at: Mon, 27 Apr 2015 19:40:11 GMT
163
+ - request:
164
+ method: get
165
+ uri: https://user:password@vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id
166
+ body:
167
+ encoding: US-ASCII
168
+ string: ''
169
+ headers:
170
+ Accept:
171
+ - application/json
172
+ Accept-Encoding:
173
+ - gzip, deflate
174
+ User-Agent:
175
+ - Ruby
176
+ X-Ops-Userid: pivotal
177
+ response:
178
+ status:
179
+ code: 200
180
+ message: OK
181
+ headers:
182
+ Server:
183
+ - Apache-Coyote/1.1
184
+ Cache-Control:
185
+ - private
186
+ Expires:
187
+ - Thu, 01 Jan 1970 00:00:00 UTC
188
+ Content-Type:
189
+ - application/json; v=5.1.1;charset=UTF-8
190
+ Transfer-Encoding:
191
+ - chunked
192
+ Date:
193
+ - Mon, 27 Apr 2015 19:40:07 GMT
194
+ body:
195
+ encoding: UTF-8
196
+ string: '{"relations":{"link":[{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/","rel":"up"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id/","rel":"remove"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id/logs/","rel":"logs"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id/state/","rel":"state"}]},"id":"some-long-execution-id","state":"completed","name":"Set-Private-Key","href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id/","start-date":1430163601587,"end-date":1430163601703,"started-by":"user@example.com","input-parameters":[{"value":{"string":{"value":"chef.server"}},"type":"string","name":"chefHostname","scope":"local"},{"value":{"string":{"value":"org-validator"}},"type":"string","name":"userid","scope":"local"},{"value":{"string":{"value":"-----BEGIN
197
+ RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA3SqsHlVmqP6OxcMBZm96sObwGHK3pM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hHx56rwTa\nc2atXj87i090h1H8OSDXW4lTfCYYinUeoyEVnNncP76Cg75FD8pRWOVy46SCDxMp\nEHa+LKgCfHBTHl0E1NdDcMQP9CSJqJ+VDyF47Z392Qg0iq3PDe7gQFPsNJkNy5Uz\nygUT0K61zVspYHzGGuxnfwKBgQCbICcGNiI3AZ5Zg/RT8y17fyFDfcKRqhDbijlp\nDMKbIwJ0VnzRiTyuWfQv2Ooo4R3GBRqoF1X2TqHHBSH4Jo2pNyfMD6pZX5KfZxG5\niWFZXBrKFAF4kTMcWZTJ9xeOamAwzpRLaDWAyQTw3dAUwE9niQkduTYQkldlhFwu\nLtnpGwKBgHblG0jaKbPGeE2QANZ1koiOoOHV007tGunmq/Bv2paRpgn/yzjpU/l8\noLWSvbabIU3ANxu6Ich6OGTikQqo+b+Pi0v5lv66nSb1lZSGk2NIll3SEF4/rmx/\n5ijGogq7y/I62ZoYUy4oZ/tKVQMqIgn3tGJ3sGImxeSwfKzxfLer\n-----END
198
+ RSA PRIVATE KEY-----\n"}},"type":"string","name":"pem","scope":"local"}],"output-parameters":[]}'
199
+ http_version:
200
+ recorded_at: Mon, 27 Apr 2015 19:40:17 GMT
201
+ - request:
202
+ method: get
203
+ uri: https://user:password@vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id
204
+ body:
205
+ encoding: US-ASCII
206
+ string: ''
207
+ headers:
208
+ Accept:
209
+ - application/json
210
+ Accept-Encoding:
211
+ - gzip, deflate
212
+ User-Agent:
213
+ - Ruby
214
+ X-Ops-Userid: pivotal
215
+ response:
216
+ status:
217
+ code: 200
218
+ message: OK
219
+ headers:
220
+ Server:
221
+ - Apache-Coyote/1.1
222
+ Cache-Control:
223
+ - private
224
+ Expires:
225
+ - Thu, 01 Jan 1970 00:00:00 UTC
226
+ Content-Type:
227
+ - application/json; v=5.1.1;charset=UTF-8
228
+ Transfer-Encoding:
229
+ - chunked
230
+ Date:
231
+ - Mon, 27 Apr 2015 19:40:11 GMT
232
+ body:
233
+ encoding: UTF-8
234
+ string: '{"relations":{"link":[{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/","rel":"up"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id/","rel":"remove"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id/logs/","rel":"logs"},{"href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id/state/","rel":"state"}]},"id":"some-long-execution-id","state":"completed","name":"Set-Private-Key","href":"https://vco.server:8281/vco/api/workflows/some-long-workflow-id/executions/some-long-execution-id/","start-date":1430163601587,"end-date":1430163601703,"started-by":"user@example.com","input-parameters":[{"value":{"string":{"value":"chef.server"}},"type":"string","name":"chefHostname","scope":"local"},{"value":{"string":{"value":"org-validator"}},"type":"string","name":"userid","scope":"local"},{"value":{"string":{"value":"-----BEGIN
235
+ RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA3SqsHlVmqP6OxcMBZm96sObwGHK3pM7LHl6F8TZ3poPzFgut\nSVt2sBfHQZC2vXIN/lnwlExtixzttgd9F4VkGij5LX/crLZ8JV7he0/+c0Y/slAg\ndqe2AMRNuxAL+s/FpqVnB7iiePIxlA9sDFhsYyHz6QtwzIRAaxnlC/ZWzJCYRHxE\nhIwZMC1oZsPdSc9k5D60vIxJLHwQ/OOIhVjk6h+szS3uRUYpHiyywF09lwaCeKR0\nFqxqSBb5yJv9lzLqhJkhHM6t0y88rNWggwj3nE3YmlCHcp/B81BTbyXT2EpF6mbt\nCQbmDO118YHDDuXGiTuSimGx9oFyw9tMe8Nx/QIBIwKCAQEAl6g7goO0HBxEpN19\nTY5FgJ5bfnqMjkSoidpqeYRvTZxO6ouqBmqah2DDJaUPl9kuKsFUgvKUQiJ3Hbv+\nAYAKIJEf5K9yv5MTTNNYyZXwTwuZZFQzhJBCSast/J1KCxIhIdCBKd2xPP3Y2o47\ndi4BLginQLdjSmlQvngoCDPjv3fRNhvy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wfKzxfLer\n-----END
236
+ RSA PRIVATE KEY-----\n"}},"type":"string","name":"pem","scope":"local"}],"output-parameters":[]}'
237
+ http_version:
238
+ recorded_at: Mon, 27 Apr 2015 19:40:21 GMT
239
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,66 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://chef.server/users
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: '{"username":"user","first_name":"first-name","last_name":"last-name","display_name":"first-name
9
+ last-name","email":"userexmaple.com","password":"password123"}'
10
+ headers:
11
+ Content-Type:
12
+ - application/json
13
+ Accept:
14
+ - application/json
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ X-Ops-Sign:
18
+ - algorithm=sha1;version=1.0;
19
+ X-Ops-Userid: pivotal
20
+ X-Ops-Timestamp:
21
+ - '2015-04-29T19:44:34Z'
22
+ X-Ops-Content-Hash:
23
+ - "{{X-Ops-Content-Hash}}"
24
+ X-Ops-Authorization-1:
25
+ - "{{X-Ops-Authorization-1}}"
26
+ X-Ops-Authorization-2:
27
+ - "{{X-Ops-Authorization-2}}"
28
+ X-Ops-Authorization-3:
29
+ - "{{X-Ops-Authorization-3}}"
30
+ X-Ops-Authorization-4:
31
+ - "{{X-Ops-Authorization-4}}"
32
+ X-Ops-Authorization-5:
33
+ - "{{X-Ops-Authorization-5}}"
34
+ X-Ops-Authorization-6:
35
+ - "{{X-Ops-Authorization-6}}"
36
+ Host:
37
+ - chef.server:443
38
+ X-Remote-Request-Id:
39
+ - dcace02e-2507-4e47-b63b-4fcfe54aa244
40
+ Content-Length:
41
+ - '158'
42
+ X-Chef-Version:
43
+ - 12.3.0
44
+ User-Agent:
45
+ - Chef Client/12.3.0 (ruby-2.1.4-p265; ohai-8.2.0; x86_64-darwin12.0; +http://opscode.com)
46
+ response:
47
+ status:
48
+ code: 400
49
+ message: Bad Request
50
+ headers:
51
+ Server:
52
+ - ngx_openresty/1.4.3.6
53
+ Date:
54
+ - Wed, 29 Apr 2015 19:44:33 GMT
55
+ Content-Length:
56
+ - '33'
57
+ Connection:
58
+ - keep-alive
59
+ X-Ops-Api-Info:
60
+ - flavor=cs;version=12.0.0;oc_erchef=1.5.0
61
+ body:
62
+ encoding: UTF-8
63
+ string: '{"error":["email must be valid"]}'
64
+ http_version:
65
+ recorded_at: Wed, 29 Apr 2015 19:44:34 GMT
66
+ recorded_with: VCR 2.9.3