vcoworkflows 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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +83 -10
- data/lib/vcoworkflows/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efbc875310f3ff7f2308404dc5f0b7b073a83749
|
4
|
+
data.tar.gz: 7bb2186ea102c06a8373c5ac3a3a9edb53ae09f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c553b3ed30daa80c8da7862795327b6a5b80e87e38c805fbef9fe9b9068b2d19c8f2003c8260e6dd60fde85548fc4bdeebf3d06c89e0de88e9f6c62c81e73c1
|
7
|
+
data.tar.gz: 830e9a0a09d43545e95c80fd25e6e834345d10d9d6a7520d563cef97ce57420f8b1980576262522f82b661687c28788540c6edece11cff062966de8f03453d1d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -59,18 +59,91 @@ Quick example:
|
|
59
59
|
```ruby
|
60
60
|
require 'vcoworkflows'
|
61
61
|
workflow = VcoWorkflows::Workflow.new(
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
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
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
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
|
|
data/lib/vcoworkflows/version.rb
CHANGED