Relayouting examples and refactoring OpenStack examples for v2
Note: Needs proper testing after v2 API and client are ready Change-Id: Idc7d59500d0c10390f0e1078fe30c99b714c83eb
This commit is contained in:
parent
168b981f91
commit
4020a8d216
@ -1,15 +0,0 @@
|
||||
Workflow:
|
||||
tasks:
|
||||
image_list:
|
||||
action: glance.images_list
|
||||
publish:
|
||||
image_id: $[0].id
|
||||
on-success: image_get
|
||||
|
||||
image_get:
|
||||
action: glance.images_get
|
||||
parameters:
|
||||
image_id: $.image_id
|
||||
publish:
|
||||
image_id: $.id
|
||||
image_name: $.name
|
@ -1,15 +0,0 @@
|
||||
Workflow:
|
||||
tasks:
|
||||
project_list:
|
||||
action: keystone.projects_list
|
||||
publish:
|
||||
project_id: $[0].id
|
||||
on-success: project_get
|
||||
|
||||
project_get:
|
||||
action: keystone.projects_get
|
||||
parameters:
|
||||
project: $.project_id
|
||||
publish:
|
||||
project: $.name
|
||||
project_id: $.id
|
@ -1,31 +0,0 @@
|
||||
Workflow:
|
||||
tasks:
|
||||
server_create:
|
||||
action: nova.servers_create
|
||||
parameters:
|
||||
name: $.server_name
|
||||
image: $.image_ref
|
||||
flavor: $.flavor_ref
|
||||
publish:
|
||||
server_id: $.id
|
||||
on-success: check_server_exists
|
||||
|
||||
check_server_exists:
|
||||
action: nova.servers_get
|
||||
parameters:
|
||||
server: $.server_id
|
||||
publish:
|
||||
server_exists: True
|
||||
on-success:
|
||||
wait_instance
|
||||
|
||||
wait_instance:
|
||||
action: nova.servers_find
|
||||
retry:
|
||||
delay: 5
|
||||
count: 15
|
||||
parameters:
|
||||
id: $.server_id
|
||||
status: 'ACTIVE'
|
||||
publish:
|
||||
instance_id: $.id
|
0
examples/v1/webhooks/api/controllers/__init__.py
Normal file
0
examples/v1/webhooks/api/controllers/__init__.py
Normal file
0
examples/v1/webhooks/cmd/__init__.py
Normal file
0
examples/v1/webhooks/cmd/__init__.py
Normal file
0
examples/v2/__init__.py
Normal file
0
examples/v2/__init__.py
Normal file
24
examples/v2/openstack/glance_actions.yaml
Normal file
24
examples/v2/openstack/glance_actions.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
Version: '2.0'
|
||||
|
||||
Workflows:
|
||||
get_first_glance_image:
|
||||
type: direct
|
||||
|
||||
output:
|
||||
image:
|
||||
id: $.image_id
|
||||
name: $.image_name
|
||||
|
||||
tasks:
|
||||
get_image_id:
|
||||
action: glance.images_list
|
||||
publish:
|
||||
image_id: $[0].id
|
||||
on-success:
|
||||
- get_image_name
|
||||
|
||||
get_image_name:
|
||||
action: glance.images_get image_id="{$.image_id}"
|
||||
publish:
|
||||
image_name: $.name
|
24
examples/v2/openstack/keystone_actions.yaml
Normal file
24
examples/v2/openstack/keystone_actions.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
Version: '2.0'
|
||||
|
||||
Workflows:
|
||||
get_first_keystone_project:
|
||||
type: direct
|
||||
|
||||
output:
|
||||
project:
|
||||
id: $.project_id
|
||||
name: $.project_name
|
||||
|
||||
tasks:
|
||||
get_project_id:
|
||||
action: keystone.projects_list
|
||||
publish:
|
||||
project_id: $[0].id
|
||||
on-success:
|
||||
- get_project_name
|
||||
|
||||
get_project_name:
|
||||
action: keystone.projects_get project="{$.project_id}"
|
||||
publish:
|
||||
project_name: $.name
|
34
examples/v2/openstack/nova_actions.yaml
Normal file
34
examples/v2/openstack/nova_actions.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
Version: '2.0'
|
||||
|
||||
Workflows:
|
||||
create_vm:
|
||||
type: direct
|
||||
parameters:
|
||||
- vm_name
|
||||
- image_ref
|
||||
- flavor_ref
|
||||
output:
|
||||
vm_id: $.vm_id
|
||||
|
||||
tasks:
|
||||
create_server:
|
||||
action: nova.servers_create name="{$.vm_name}" image="{$.image_ref}" flavor="{$.flavor_ref}"
|
||||
publish:
|
||||
vm_id: $.id
|
||||
on-success:
|
||||
- check_server_exists
|
||||
|
||||
check_server_exists:
|
||||
action: nova.servers_get server="{$.vm_id}"
|
||||
publish:
|
||||
server_exists: True
|
||||
on-success:
|
||||
- wait_instance
|
||||
|
||||
wait_instance:
|
||||
action: nova.servers_find id="{$.vm_id}" status='ACTIVE'
|
||||
policies:
|
||||
retry:
|
||||
delay: 5
|
||||
count: 15
|
Loading…
Reference in New Issue
Block a user