chef-provisioning-opennebula 0.4.4 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +273 -4
- data/lib/chef/provider/one_flow_service.rb +346 -0
- data/lib/chef/provider/one_flow_template.rb +175 -0
- data/lib/chef/provider/one_image.rb +6 -6
- data/lib/chef/provider/one_template.rb +4 -6
- data/lib/chef/provider/one_user.rb +11 -14
- data/lib/chef/provider/one_vnet.rb +6 -9
- data/lib/chef/provider/one_vnet_lease.rb +3 -3
- data/lib/chef/provisioning/driver_init/opennebula.rb +1 -1
- data/lib/chef/provisioning/driver_init/server_version.rb +28 -0
- data/lib/chef/provisioning/opennebula_driver.rb +1 -1
- data/lib/chef/provisioning/opennebula_driver/credentials.rb +2 -2
- data/lib/chef/provisioning/opennebula_driver/driver.rb +132 -34
- data/lib/chef/provisioning/opennebula_driver/flow_lib.rb +491 -0
- data/lib/chef/provisioning/opennebula_driver/one_lib.rb +39 -49
- data/lib/chef/provisioning/opennebula_driver/resources.rb +2 -2
- data/lib/chef/provisioning/opennebula_driver/version.rb +2 -2
- data/lib/chef/resource/one_flow_service.rb +61 -0
- data/lib/chef/resource/one_flow_template.rb +53 -0
- data/lib/chef/resource/one_image.rb +2 -2
- data/lib/chef/resource/one_template.rb +1 -1
- data/lib/chef/resource/one_user.rb +1 -1
- data/lib/chef/resource/one_vnet.rb +2 -2
- data/lib/chef/resource/one_vnet_lease.rb +1 -1
- data/spec/config_sample.rb +12 -3
- data/spec/integration/test_all_integration_spec.rb +6 -272
- data/spec/integration/test_one_driver.rb +177 -0
- data/spec/integration/test_one_flow.rb +546 -0
- data/spec/recipes/OneDriver/{instantiate_one_template_spec.rb → allocate_change_profile.rb} +5 -7
- data/spec/recipes/OneDriver/{converge_back_two_vm_spec.rb → attach_one_image.rb} +4 -5
- data/spec/recipes/OneDriver/create_one_image.rb +20 -0
- data/spec/recipes/OneDriver/{create_one_template_int_spec.rb → create_one_template_ints.rb} +21 -4
- data/spec/recipes/OneDriver/create_one_template_mix.rb +51 -0
- data/spec/recipes/OneDriver/{create_one_image_spec.rb → create_one_template_strings.rb} +18 -7
- data/spec/recipes/OneDriver/{converge_back_one_vm_spec.rb → create_one_vnet.rb} +5 -5
- data/spec/recipes/OneDriver/delete/{OpenNebula-tpl-1-vm.rb → OpenNebula-test-img.rb} +2 -4
- data/spec/recipes/OneDriver/delete/{OpenNebula-back-1-vm.rb → OpenNebula-test-snap-img.rb} +2 -4
- data/spec/recipes/OneDriver/delete/OpenNebula-test-tpl-ints.rb +2 -4
- data/spec/recipes/OneDriver/delete/{OpenNebula-test-tpl.rb → OpenNebula-test-tpl-mix.rb} +2 -4
- data/spec/recipes/OneDriver/delete/OpenNebula-test-tpl-strings.rb +17 -0
- data/spec/recipes/OneDriver/delete/{OpenNebula-back-2-vm.rb → OpenNebula-test-vm-vnet.rb} +2 -4
- data/spec/recipes/OneDriver/delete/{OpenNebula-bootstrap-vm.rb → OpenNebula-test-vm.rb} +2 -4
- data/spec/recipes/OneDriver/delete/OpenNebula-test-vnet.rb +17 -0
- data/spec/recipes/OneDriver/{attach_back_one_vm_spec.rb → instantiate_one_template.rb} +7 -6
- data/spec/recipes/OneDriver/{converge_bootstrap_vm_spec.rb → instantiate_one_template_vnet.rb} +10 -8
- data/spec/recipes/OneDriver/snapshot_one_image.rb +19 -0
- data/spec/recipes/OneFlowService/action/boot.rb +19 -0
- data/spec/recipes/OneFlowService/action/delete.rb +18 -0
- data/spec/recipes/OneFlowService/action/delete_recreate.rb +18 -0
- data/spec/recipes/OneFlowService/action/hold.rb +19 -0
- data/spec/recipes/OneFlowService/action/poweroff.rb +18 -0
- data/spec/recipes/OneFlowService/action/poweroff_hard.rb +18 -0
- data/spec/recipes/OneFlowService/action/reboot.rb +18 -0
- data/spec/recipes/OneFlowService/action/reboot_hard.rb +18 -0
- data/spec/recipes/OneFlowService/action/release.rb +19 -0
- data/spec/recipes/OneFlowService/action/resume.rb +18 -0
- data/spec/recipes/OneFlowService/action/scale.rb +19 -0
- data/spec/recipes/OneFlowService/action/shutdown.rb +18 -0
- data/spec/recipes/OneFlowService/action/shutdown_hard.rb +18 -0
- data/spec/recipes/OneFlowService/action/shutdown_service.rb +17 -0
- data/spec/recipes/OneFlowService/action/snapshot_create.rb +18 -0
- data/spec/recipes/OneFlowService/action/stop.rb +18 -0
- data/spec/recipes/OneFlowService/action/suspend.rb +18 -0
- data/spec/recipes/OneFlowService/action/undeploy.rb +18 -0
- data/spec/recipes/OneFlowService/action/undeploy_hard.rb +18 -0
- data/spec/recipes/OneFlowService/chmod_simple_by_name.rb +19 -0
- data/spec/recipes/OneFlowService/chmod_simple_by_name_2.rb +18 -0
- data/spec/recipes/OneFlowService/chmod_tpl_opts.rb +31 -0
- data/spec/recipes/OneFlowService/delete/test_instance_template_options.rb +17 -0
- data/spec/recipes/OneFlowService/delete/test_role_action.rb +17 -0
- data/spec/recipes/OneFlowService/delete/test_simple_instance.rb +17 -0
- data/spec/recipes/OneFlowService/delete/test_simple_instance_by_id.rb +17 -0
- data/spec/recipes/{OneDriver/create_bootstrap_vm_spec.rb → OneFlowService/instance_role_action.rb} +19 -11
- data/spec/recipes/OneFlowService/instance_simple_by_id.rb +20 -0
- data/spec/recipes/OneFlowService/instance_simple_by_name.rb +18 -0
- data/spec/recipes/OneFlowService/instance_tpl_opts.rb +30 -0
- data/spec/recipes/OneFlowTemplate/chmod_simple_from_hash.rb +17 -0
- data/spec/recipes/OneFlowTemplate/chmod_update_simple_from_file.rb +19 -0
- data/spec/recipes/OneFlowTemplate/create_branch_from_one_id.rb +43 -0
- data/spec/recipes/OneFlowTemplate/create_branch_from_one_name.rb +20 -0
- data/spec/recipes/OneFlowTemplate/create_role_action_instance.rb +99 -0
- data/spec/recipes/OneFlowTemplate/create_simple_from_file.rb +18 -0
- data/spec/recipes/{OneDriver/attach_back_two_vm_spec.rb → OneFlowTemplate/create_simple_from_hash.rb} +8 -6
- data/spec/recipes/OneFlowTemplate/create_simple_from_web.rb +17 -0
- data/spec/recipes/{OneDriver/attach_one_image_spec.rb → OneFlowTemplate/create_simple_instance_tpl.rb} +8 -6
- data/spec/recipes/OneFlowTemplate/create_tpl_opts_from_file.rb +30 -0
- data/spec/recipes/OneFlowTemplate/create_tpl_opts_from_hash.rb +35 -0
- data/spec/recipes/OneFlowTemplate/delete/branch_from_one_id.rb +17 -0
- data/spec/recipes/OneFlowTemplate/delete/branch_from_one_name.rb +17 -0
- data/spec/recipes/OneFlowTemplate/delete/role_action_instance.rb +17 -0
- data/spec/recipes/OneFlowTemplate/delete/simple_from_file.rb +17 -0
- data/spec/recipes/OneFlowTemplate/delete/simple_from_hash.rb +17 -0
- data/spec/recipes/OneFlowTemplate/delete/simple_from_web.rb +17 -0
- data/spec/recipes/OneFlowTemplate/delete/simple_instance_tpl.rb +17 -0
- data/spec/recipes/OneFlowTemplate/delete/tpl_opts_from_file.rb +17 -0
- data/spec/recipes/OneFlowTemplate/delete/tpl_opts_from_hash.rb +17 -0
- data/spec/recipes/OneFlowTemplate/update_simple_from_hash.rb +57 -0
- data/spec/recipes/{driver_options_spec.rb → common.rb} +9 -3
- data/spec/spec_helper.rb +22 -17
- data/spec/support/opennebula_support.rb +75 -45
- metadata +114 -27
- data/spec/recipes/OneDriver/create_back_one_vm_spec.rb +0 -20
- data/spec/recipes/OneDriver/create_back_two_vm_spec.rb +0 -20
- data/spec/recipes/OneDriver/create_one_template_spec.rb +0 -21
- data/spec/recipes/OneDriver/delete/OpenNebula-bootstrap-img.rb +0 -19
- data/spec/recipes/OneDriver/delete/OpenNebula-snap-1-img.rb +0 -19
- data/spec/recipes/OneDriver/delete/OpenNebula-snap-2-img.rb +0 -19
- data/spec/recipes/OneDriver/snapshot_one_image_spec.rb +0 -21
- data/spec/recipes/OneDriver/snapshot_two_image_spec.rb +0 -21
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_service 'test_role_action' do
|
16
|
+
action :delete
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_service 'test_simple_instance' do
|
16
|
+
action :delete
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_service 'test_simple_instance_by_id' do
|
16
|
+
action :delete
|
17
|
+
end
|
data/spec/recipes/{OneDriver/create_bootstrap_vm_spec.rb → OneFlowService/instance_role_action.rb}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2016, BlackBerry
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -12,15 +12,23 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
15
|
+
one_flow_service 'test_role_action' do
|
16
|
+
template 'test_role_action_instance'
|
17
|
+
template_options :roles => [
|
18
|
+
{
|
19
|
+
:name => 'do_not_instance',
|
20
|
+
:delete_role => true
|
21
|
+
},
|
22
|
+
{
|
23
|
+
:name => 'snapshot_create',
|
24
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
25
|
+
:cooldown => 10
|
26
|
+
},
|
27
|
+
{
|
28
|
+
:name => 'scale',
|
29
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
30
|
+
:cooldown => 10
|
23
31
|
}
|
24
|
-
|
25
|
-
action :
|
32
|
+
]
|
33
|
+
action :instantiate
|
26
34
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
id = Chef::Provisioning::OpenNebulaDriver::FlowLib.new(ONE_FLOW_URL, one_auth).get_unique_template_id('test_simple_instance_tpl')
|
16
|
+
|
17
|
+
one_flow_service 'test_simple_instance_by_id' do
|
18
|
+
template id
|
19
|
+
action :instantiate
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_service 'test_simple_instance' do
|
16
|
+
template 'test_simple_instance_tpl'
|
17
|
+
mode '640'
|
18
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_service 'test_instance_template_options' do
|
16
|
+
template 'test_simple_instance_tpl'
|
17
|
+
template_options :name => 'gary',
|
18
|
+
:deployment => 'none',
|
19
|
+
:roles => [
|
20
|
+
{
|
21
|
+
:name => 'gary_ubuntu',
|
22
|
+
:delete_role => true
|
23
|
+
},
|
24
|
+
{
|
25
|
+
:name => 'gary_ubuntu_new',
|
26
|
+
:vm_template => 'OpenNebula-test-tpl-strings'
|
27
|
+
}
|
28
|
+
]
|
29
|
+
action :instantiate
|
30
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_template 'test_simple_from_hash' do
|
16
|
+
mode '640'
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_template 'gary' do
|
16
|
+
name 'test_simple_from_file'
|
17
|
+
template 'file:///tmp/one_rspec_test.json'
|
18
|
+
mode '666'
|
19
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
id = Chef::Provisioning::OpenNebulaDriver::FlowLib.new(ONE_FLOW_URL, one_auth).get_unique_template_id('test_simple_from_hash')
|
16
|
+
|
17
|
+
one_flow_template 'gary' do
|
18
|
+
name 'gary2'
|
19
|
+
template id
|
20
|
+
template_options :name => 'test_branch_from_one_id',
|
21
|
+
:description => 'my description is very descriptive',
|
22
|
+
:roles => [
|
23
|
+
{
|
24
|
+
:name => 'gary_ubuntu_2',
|
25
|
+
:delete_role => true
|
26
|
+
},
|
27
|
+
{
|
28
|
+
:name => 'gary_ubuntu',
|
29
|
+
:scheduled_policies => [
|
30
|
+
{
|
31
|
+
:type => "CHANGE",
|
32
|
+
:adjust => 1,
|
33
|
+
:start_time => "0 3 1-10 * *"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
:type => "CARDINALITY",
|
37
|
+
:recurrence => "0 4 1-10 * *",
|
38
|
+
:adjust => 2
|
39
|
+
}
|
40
|
+
]
|
41
|
+
}
|
42
|
+
]
|
43
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_template 'gary' do
|
16
|
+
name 'gary2'
|
17
|
+
template 'test_simple_from_hash'
|
18
|
+
template_options :name => 'test_branch_from_one_name',
|
19
|
+
:description => 'my description is very descriptive'
|
20
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_template 'test_role_action_instance' do
|
16
|
+
template :roles => [
|
17
|
+
{
|
18
|
+
:name => 'shutdown',
|
19
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
20
|
+
:cooldown => 10
|
21
|
+
},
|
22
|
+
{
|
23
|
+
:name => 'shutdown_hard',
|
24
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
25
|
+
:cooldown => 10
|
26
|
+
},
|
27
|
+
{
|
28
|
+
:name => 'undeploy',
|
29
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
30
|
+
:cooldown => 10
|
31
|
+
},
|
32
|
+
{
|
33
|
+
:name => 'undeploy_hard',
|
34
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
35
|
+
:cooldown => 10
|
36
|
+
},
|
37
|
+
{
|
38
|
+
:name => 'hold',
|
39
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
40
|
+
:cooldown => 10
|
41
|
+
},
|
42
|
+
{
|
43
|
+
:name => 'release',
|
44
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
45
|
+
:cooldown => 10
|
46
|
+
},
|
47
|
+
{
|
48
|
+
:name => 'stop',
|
49
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
50
|
+
:cooldown => 10
|
51
|
+
},
|
52
|
+
{
|
53
|
+
:name => 'suspend_resume',
|
54
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
55
|
+
:cooldown => 10
|
56
|
+
},
|
57
|
+
{
|
58
|
+
:name => 'boot',
|
59
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
60
|
+
:cooldown => 10
|
61
|
+
},
|
62
|
+
{
|
63
|
+
:name => 'delete',
|
64
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
65
|
+
:cooldown => 10
|
66
|
+
},
|
67
|
+
{
|
68
|
+
:name => 'delete_recreate',
|
69
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
70
|
+
:cooldown => 10
|
71
|
+
},
|
72
|
+
{
|
73
|
+
:name => 'reboot',
|
74
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
75
|
+
:cooldown => 10
|
76
|
+
},
|
77
|
+
{
|
78
|
+
:name => 'reboot_hard',
|
79
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
80
|
+
:cooldown => 10
|
81
|
+
},
|
82
|
+
{
|
83
|
+
:name => 'poweroff',
|
84
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
85
|
+
:cooldown => 10
|
86
|
+
},
|
87
|
+
{
|
88
|
+
:name => 'poweroff_hard',
|
89
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
90
|
+
:cooldown => 10
|
91
|
+
},
|
92
|
+
{
|
93
|
+
:name => 'do_not_instance',
|
94
|
+
:vm_template => 'OpenNebula-test-tpl-strings',
|
95
|
+
:cooldown => 10
|
96
|
+
}
|
97
|
+
]
|
98
|
+
action :create
|
99
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_template 'gary' do
|
16
|
+
name 'test_simple_from_file'
|
17
|
+
template 'file:///tmp/one_rspec_test.json'
|
18
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2016, BlackBerry
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -12,9 +12,11 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
one_flow_template 'test_simple_from_hash' do
|
16
|
+
template :roles => [
|
17
|
+
{
|
18
|
+
:name => 'gary_ubuntu',
|
19
|
+
:vm_template => 'OpenNebula-test-tpl-strings'
|
20
|
+
}
|
21
|
+
]
|
20
22
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
one_flow_template 'test_simple_from_web' do
|
16
|
+
template 'https://dongyuzheng.com/static/misc/one_rspec_test.json'
|
17
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2016, BlackBerry
|
1
|
+
# Copyright 2016, BlackBerry Limited
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -12,9 +12,11 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
one_flow_template 'test_simple_instance_tpl' do
|
16
|
+
template :roles => [
|
17
|
+
{
|
18
|
+
:name => 'gary_ubuntu',
|
19
|
+
:vm_template => 'OpenNebula-test-tpl-strings'
|
20
|
+
}
|
21
|
+
]
|
20
22
|
end
|