Skip to content

Commit

Permalink
Merge pull request #208 from Cloudify-PS/openstack_clients_upgrade
Browse files Browse the repository at this point in the history
Python client verisons update:
  • Loading branch information
EarthmanT authored Mar 5, 2018
2 parents 2b34f1b + 3fa06c9 commit 12d9fbd
Show file tree
Hide file tree
Showing 22 changed files with 1,611 additions and 666 deletions.
139 changes: 139 additions & 0 deletions blueprints/plugin_testing/create_admin_resources_test-blueprint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
#Blueprint used for testing creation, deletion and other operations for these node_types:
#
#* cloudify.openstack.nodes.Flavor
#* cloudify.openstack.nodes.Image
#* cloudify.openstack.nodes.Project
#* cloudify.openstack.nodes.User
#* cloudify.openstack.nodes.HostAggregate
#

tosca_definitions_version: cloudify_dsl_1_3

imports:
- http://www.getcloudify.org/spec/cloudify/4.2/types.yaml
- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-openstack-plugin/master/plugin.yaml

inputs:
openstack_username:
type: string
default: { get_secret: keystone_username }

openstack_password:
type: string
default: { get_secret: keystone_password }

openstack_auth_url:
type: string
default: { get_secret: keystone_url }

openstack_region:
type: string
default: { get_secret: keystone_region }

openstack_admin_tenant_name: # should admin_tenant name be required to provision new tenet / user ?
type: string
default: 'admin'

dsl_definitions:
openstack_config: &openstack_config
username: { get_input: openstack_username }
password: { get_input: openstack_password }
tenant_name: { get_input: openstack_admin_tenant_name }
auth_url: { get_input: openstack_auth_url }
region: { get_input: openstack_region }

node_templates:
test_user:
type: cloudify.openstack.nodes.User
properties:
user:
name: 'openstack_plugin_test_user'
use_external_resource: false
resource_id: 'openstack_plugin_test_user'
openstack_config: *openstack_config

test_project:
type: cloudify.openstack.nodes.Project
properties:
project:
name: 'openstack_plugin_test_project'
users:
- name: 'admin'
roles: ['admin']
- name: 'openstack_plugin_test_user'
roles: ['admin']
quota:
cinder:
volumes: 1
nova:
ram: 12800
instances: 5
cores: 10
use_external_resource: false
resource_id: 'openstack_plugin_test_project'
openstack_config: *openstack_config
relationships:
- type: cloudify.relationships.depends_on
target: test_user

test_flavor:
type: cloudify.openstack.nodes.Flavor
properties:
flavor:
name: 'openstack_plugin_test_flavor'
ram: 2048
disk: 0
vcpus: 2
use_external_resource: false
resource_id: 'openstack_plugin_test_flavor'
openstack_config:
username: { get_input: openstack_username }
password: { get_input: openstack_password }
auth_url: { get_input: openstack_auth_url }
region: { get_input: openstack_region }
tenant_name: { get_attribute: [test_project, external_name] }
relationships:
- type: cloudify.relationships.depends_on
target: test_project

test_image:
type: cloudify.openstack.nodes.Image
properties:
image:
container_format: 'bare'
disk_format: 'iso'
image_url: 'https://stable.release.core-os.net/amd64-usr/current/coreos_production_iso_image.iso'
use_external_resource: false
resource_id: 'openstack_plugin_test_image'
openstack_config:
username: { get_input: openstack_username }
password: { get_input: openstack_password }
auth_url: { get_input: openstack_auth_url }
region: { get_input: openstack_region }
tenant_name: { get_attribute: [test_project, external_name] }
relationships:
- type: cloudify.relationships.depends_on
target: test_project

test_host_aggregate:
type: cloudify.openstack.nodes.HostAggregate
properties:
aggregate:
name: 'openstack_plugin_test_image'
availability_zone: 'internal'
hosts:
- 'cf4301'
- 'openstack-kilo-t2.novalocal'
metadata:
test: 'value1'
use_external_resource: false
resource_id: 'openstack_plugin_test_image'
openstack_config:
username: { get_input: openstack_username }
password: { get_input: openstack_password }
auth_url: { get_input: openstack_auth_url }
region: { get_input: openstack_region }
tenant_name: { get_attribute: [test_project, external_name] }
relationships:
- type: cloudify.relationships.depends_on
target: test_project
Loading

0 comments on commit 12d9fbd

Please sign in to comment.