vcoworkflows 0.2.0 → 0.2.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: 4aecbf8d560cb33986bb7724cb185dd4c674f979
4
- data.tar.gz: afa37f3f01dc4e31e70121a5acb764192d0ea1f0
3
+ metadata.gz: efbc875310f3ff7f2308404dc5f0b7b073a83749
4
+ data.tar.gz: 7bb2186ea102c06a8373c5ac3a3a9edb53ae09f4
5
5
  SHA512:
6
- metadata.gz: 2be9992176d0cde2177ade9b116047cb3cc2ee922d795efcfb9035c627ddc00dfac1aa68ac71859d896e7beb796af76bd1d7db7d252f21c271d6d00a7250b0e8
7
- data.tar.gz: e298f6c3070df696fad7e3132798a55ad85522ad5890b99038fff2800ef03689c812175bc62cf3e8f5f3956e04697d607dbec5c4873f3b5ebb506861241a9334
6
+ metadata.gz: 3c553b3ed30daa80c8da7862795327b6a5b80e87e38c805fbef9fe9b9068b2d19c8f2003c8260e6dd60fde85548fc4bdeebf3d06c89e0de88e9f6c62c81e73c1
7
+ data.tar.gz: 830e9a0a09d43545e95c80fd25e6e834345d10d9d6a7520d563cef97ce57420f8b1980576262522f82b661687c28788540c6edece11cff062966de8f03453d1d
@@ -1,6 +1,10 @@
1
1
  vcoworkflows CHANGELOG
2
2
  ================
3
3
 
4
+ ## 0.2.1
5
+
6
+ - Update README with configuration file instructions
7
+
4
8
  ## 0.2.0
5
9
 
6
10
  - Removes `VcoWorkflows::Cli::Auth`
data/README.md CHANGED
@@ -59,18 +59,91 @@ Quick example:
59
59
  ```ruby
60
60
  require 'vcoworkflows'
61
61
  workflow = VcoWorkflows::Workflow.new(
62
- 'Request Component',
63
- url: 'https://vco.example.com:8281/',
64
- username: 'jdoe',
65
- password: 's3cr3t'
62
+ 'Request Component',
63
+ url: 'https://vco.example.com:8281/',
64
+ username: 'jdoe',
65
+ password: 's3cr3t'
66
66
  )
67
-
68
67
  ```
69
68
 
70
69
  All the necessary interactions with a Workflow in vCenter Orchestrator are
71
70
  available via the [`VcoWorkflows::Workflow`](lib/vcoworkflows/Workflow.rb)
72
71
  class.
73
72
 
73
+ ### Configuration
74
+
75
+ #### Configuration File
76
+
77
+ The configuration file format is a simple JSON document with the following keys:
78
+
79
+ - `url` - (*Required*) The vCO server URL (i.e., 'https://vco.example.com:8281/')
80
+ - `username` - (*Optional*) User to authenticate as. Likely in the form
81
+ `DOMAIN\\username` (be sure to escape backslashes). If not present, this can
82
+ be provided via the command-line parameter `--username` or by setting
83
+ `$VCO_USER` in the environment.
84
+ - `password` - (*Optional*) Password to authenticate with. If not present, this
85
+ can be provided via the command-line parameter `--password` or by setting
86
+ `$VCO_PASSWD` in the environment.
87
+ - `verify_ssl` - (*Optional*) Whether to perform TLS/SSL certificate validation.
88
+ Defaults to `true`.
89
+
90
+ An example configuration file, then, would look like:
91
+
92
+ ```json
93
+ {
94
+ "verify_ssl": true,
95
+ "password": "s3cr3t",
96
+ "username": "EXAMPLE\\jdoe",
97
+ "url": "https://vco.example.com:8281/"
98
+ }
99
+ ```
100
+
101
+ If `url`, `username` and `password` are not provided when created a new
102
+ `Workflow` object, `VcoWorkflows` will look for a configuration file at:
103
+
104
+ ```shell
105
+ ${HOME}/.vcoworkflows/config.json
106
+ ```
107
+
108
+ Alternately, you can specify a different configuration file when constructing
109
+ the `Workflow` object:
110
+
111
+ ```ruby
112
+ workflow = VcoWorkflows::Workflow.new(
113
+ 'My Workflow',
114
+ config_file: '/tmp/vcoworkflow.json`
115
+ )
116
+ ```
117
+
118
+ #### `VcoWorkflows::Config` class
119
+
120
+ For additional control, you can create a `VcoWorkflows::Config` object and
121
+ hand that to the `Workflow` constructor. If you provide no parameters, it will
122
+ attempt to load the default configuration file, as above:
123
+
124
+ ```ruby
125
+ config = VcoWorkflows::Config.new
126
+ workflow = VcoWorkflows::Workflow.new('My Workflow', config: config)
127
+ ```
128
+
129
+ You can also specify a non-default configuration file:
130
+
131
+ ```ruby
132
+ config = VcoWorkflows::Config.new(config_file: '/tmp/myconfig.json')
133
+ ```
134
+
135
+ And, of course, you can set all the required parameters yourself if you don't
136
+ want or need to use a configuration file:
137
+
138
+ ```ruby
139
+ config = VcoWorkflows::Config.new(
140
+ url: 'https://vco.example.com:8281/',
141
+ username: 'jdoe',
142
+ password: 's3cr3t'
143
+ )
144
+ workflow = VcoWorkflows::Workflow.new('My Workflow', config: config)
145
+ ```
146
+
74
147
  ### Selecting a Workflow
75
148
 
76
149
  It is possible to select a Workflow by GUID (as divined by the vCenter
@@ -84,11 +157,11 @@ creating a new `Workflow` object:
84
157
 
85
158
  ```ruby
86
159
  workflow = VcoWorkflows::Workflow.new(
87
- 'Request Component',
88
- id: '6e04a460-4a45-4e16-9603-db2922c24462',
89
- url: 'https://vco.example.com:8281/',
90
- username: 'jdoe',
91
- password: 's3cr3t'
160
+ 'My Workflow',
161
+ id: '6e04a460-4a45-4e16-9603-db2922c24462',
162
+ url: 'https://vco.example.com:8281/',
163
+ username: 'jdoe',
164
+ password: 's3cr3t'
92
165
  )
93
166
  ```
94
167
 
@@ -1,5 +1,5 @@
1
1
  # VcoWorkflows
2
2
  module VcoWorkflows
3
3
  # Gem Version
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcoworkflows
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
  - Gregory Ruiz-ade