diff --git a/.circleci/config.yml b/.circleci/config.yml index fbadf5f0..c429b238 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,10 +1,20 @@ version: 2.1 +unittest-post-steps: &unittest-post-steps + post-steps: + - store_test_results: + path: /home/circleci/project/nosetests.xml + - store_artifacts: + path: /home/circleci/project/coverage.xml + prefix: tests + - slack/notify_failed + orbs: - node: cloudify/public-unittest-orb@1 #orb version - wagonorb: cloudify/wagon-bulder-orb@2.4.0 #orb version - releaseorb: cloudify/release-orb@1.4.0 #orb version - managerorb: cloudify/manager-orb@1 + node: cloudify/public-unittest-orb@volatile + wagonorb: cloudify/wagon-bulder-orb@volatile + releaseorb: cloudify/release-orb@volatile + managerorb: cloudify/manager-orb@volatile + slack: cloudify/notify-slack@2 checkout: post: @@ -24,38 +34,36 @@ workflows: tests: jobs: - node/check_py3_compat_job - - node/unittests_job + - node/unittests_job: + context: + - plugins-inputs - node/validate_version_job - node/validate_documentation_job - wagonorb/wagon: filters: branches: only: /([0-9\.]*\-build|master|2.X-master)/ - - wagonorb/arch64_wagon: + - wagonorb/wagon_311: filters: branches: only: /([0-9\.]*\-build|master|2.X-master)/ - - wagonorb/rhel_wagon: + - wagonorb/arch64_wagon: filters: branches: only: /([0-9\.]*\-build|master|2.X-master)/ - - wagonorb/build_bundle: + - wagonorb/rhel_wagon: filters: branches: only: /([0-9\.]*\-build|master|2.X-master)/ - requires: - - wagonorb/wagon - - wagonorb/arch64_wagon - - wagonorb/rhel_wagon - releaseorb/release: filters: branches: only: /(master|2.X-master)/ requires: - wagonorb/wagon + - wagonorb/wagon_311 - wagonorb/arch64_wagon - wagonorb/rhel_wagon - - wagonorb/build_bundle # - node/validate_version_job - node/validate_documentation_job - releaseorb/merge_docs_job: @@ -76,4 +84,6 @@ workflows: jobs: - node/check_py3_compat_job - node/validate_version_job - - node/unittests_job + - node/unittests_job: + context: + - plugins-inputs diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2d5ac79d..c06cc719 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,4 @@ +2.14.26: Manylinux and DSL 1.5. 2.14.25: Support Redhat8 and dsl 1_4. 2.14.24: Rerelease for ARM64 wagon. 2.14.23: diff --git a/constraints.txt b/constraints.txt index cdc71c7f..15877626 100644 --- a/constraints.txt +++ b/constraints.txt @@ -1,6 +1,5 @@ -PyYAML==3.12 +oslo.config==7.0.0 subprocess32==3.5.3 pyrsistent===0.16.1 +openstacksdk===0.15.0 cloudify-common>=5.1.0 -cryptography==3.3.2 -oslo.config==7.0.0 \ No newline at end of file diff --git a/extra-packaging-instructions.sh b/extra-packaging-instructions.sh new file mode 100644 index 00000000..d65f3e47 --- /dev/null +++ b/extra-packaging-instructions.sh @@ -0,0 +1,15 @@ +if [[ $PY311 == 1 ]] +then + mkdir -p ./pydoc + touch ./pydoc/__init__.py + cat < ./pydoc/__init__.py +def get_doc(*args): + return '' +EOF + mkdir -p ./webbrowser + touch ./webbrowser/__init__.py + cat < ./webbrowser/__init__.py +EOF + git apply python311.patch + echo patch applied +fi diff --git a/openstack_plugin_common/__version__.py b/openstack_plugin_common/__version__.py new file mode 100644 index 00000000..bcb70d05 --- /dev/null +++ b/openstack_plugin_common/__version__.py @@ -0,0 +1 @@ +version = '2.14.26' diff --git a/plugin.yaml b/plugin.yaml index 0487eaa4..54d34e20 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -6,7 +6,7 @@ plugins: openstack: executor: central_deployment_agent package_name: cloudify-openstack-plugin - package_version: '2.14.25' + package_version: '2.14.26' data_types: cloudify.openstack.types.custom_configuration: diff --git a/plugin_1_4.yaml b/plugin_1_4.yaml index 1f6f7fe7..6bb912f9 100644 --- a/plugin_1_4.yaml +++ b/plugin_1_4.yaml @@ -6,7 +6,7 @@ plugins: openstack: executor: central_deployment_agent package_name: cloudify-openstack-plugin - package_version: '2.14.25' + package_version: '2.14.26' data_types: cloudify.openstack.types.custom_configuration: diff --git a/plugin_1_5.yaml b/plugin_1_5.yaml new file mode 100644 index 00000000..6bb912f9 --- /dev/null +++ b/plugin_1_5.yaml @@ -0,0 +1,1979 @@ +################################################################################## +# Cloudify OpenStack built in types and plugins definitions. +################################################################################## + +plugins: + openstack: + executor: central_deployment_agent + package_name: cloudify-openstack-plugin + package_version: '2.14.26' + +data_types: + cloudify.openstack.types.custom_configuration: + description: Custom configuration for OpenStack's API endpoints. + properties: + nova_client: + description: Parameters for Nova Client. + required: false + neutron_client: + description: Parameters for Neutron Client. + required: false + keystone_client: + description: Parameters for Keystone Client. + required: false + cinder_client: + description: Parameters for Cinder Client. + required: false + glance_client: + description: Parameters for Glance Client. + required: false + + cloudify.openstack.types.logging.groups: + description: > + For logging groups' configuration. Each level can be one of the following values: + critical/error/warning/info/debug/notset + properties: + nova: + description: Default logging level for Nova. + type: string + required: false + neutron: + description: Default logging level for Neutron. + type: string + required: false + cinder: + description: Default logging level for Cinder. + type: string + required: false + keystone: + description: Default logging level for Keystone. + type: string + required: false + glance: + description: Default logging level for Glance. + type: string + required: false + + cloudify.openstack.types.logging: + description: Logging configuration for OpenStack communication. + properties: + use_cfy_logger: + description: If true, a logging handler is added, which emits logs to the Cloudify logger. + type: boolean + default: true + groups: + description: Assigns logging level to logger groups. + type: cloudify.openstack.types.logging.groups + required: false + loggers: + description: Assigns logging level to custom loggers (dictionary of string -> logging level). + required: false + + # Note: as per CFY-7824, this custom type cannot be used as an argument + # to the "type:" field of operation inputs. + + cloudify.openstack.types.configuration: + description: Configuration for OpenStack communication. + properties: + username: + description: User to authenticate to KeyStone with. + type: string + required: false + password: + description: Password to authenticate to KeyStone with. + type: string + required: false + auth_url: + description: Keystone's URL (used for authentication). + type: string + required: false + tenant_name: + description: Name of tenant. + type: string + required: false + tenant_id: + description: | + Id of tenant. Same as project_id, added for backwards compatibility. + type: string + required: false + project_id: + description: ID of project to operate on. + type: string + required: false + project_name: + description: Name of project to operate on. + type: string + required: false + user_domain_name: + description: Domain name to operate on. + type: string + required: false + project_domain_name: + description: Project domain name to operate on. + type: string + required: false + region: + description: The region's name (optional if only one region exists). + type: string + required: false + insecure: + description: If true, SSL validation is skipped. + type: boolean + required: false + default: false + ca_cert: + description: Path to CA certificate to validate OpenStack's endpoint with. + type: string + required: false + nova_url: + description: DEPRECATED - use 'custom_configuration' and 'bypass_url' instead. + type: string + required: false + neutron_url: + description: DEPRECATED - use 'custom_configuration' and 'endpoint_url' instead. + type: string + required: false + custom_configuration: + description: Custom configuration for OpenStack's API endpoints. + type: cloudify.openstack.types.custom_configuration + required: false + logging: + description: Logging configuration. + type: cloudify.openstack.types.logging + required: false + +node_types: + + cloudify.openstack.nodes.Server: + derived_from: cloudify.nodes.Compute + properties: + server: + default: {} + description: > + The keypair object as described in OpenStack compute API (create server method): + https://developer.openstack.org/api-ref/compute/#servers-servers + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + image: + type: string + default: '' + description: > + The image for the server. + May receive either the ID or the name of the image. + note: This property is currently optional for backwards compatibility, + but will be modified to become a required property in future versions + (Default: ''). + flavor: + type: string + default: '' + description: > + The flavor for the server. + May receive either the ID or the name of the flavor. + note: This property is currently optional for backwards compatibility, + but will be modified to become a required property in future versions + (Default: ''). + management_network_name: + type: string + required: false + description: > + Old requirement called management network name. Not required. Leave blank. Retained for backward compatibility. + Not every server need be connected to a management network. + If the management network's name information is available in the Provider Context, + this connection is made automatically and there's no need to override this property + (See the Misc section for more information on the Openstack Provider Context). + It is not required to set the value of this property to the management network name. As of Cloudify 4.0, it has no relationship to the bootstrap process. + use_password: + type: boolean + default: false + description: > + A boolean describing whether this server image supports user-password authentication. + Images that do should post the administrator user's password to the Openstack metadata service (e.g. via cloudbase); + The password would then be retrieved by the plugin, + decrypted using the server's keypair and then saved in the server's runtime properties. + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + see Openstack Configuraion + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.nova_plugin.server.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + start: + implementation: openstack.nova_plugin.server.start + inputs: + start_retry_interval: + description: Polling interval until the server is active in seconds + type: integer + default: 30 + private_key_path: + description: > + Path to private key which matches the server's + public key. Will be used to decrypt password in case + the "use_password" property is set to "true" + type: string + default: '' + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + stop: + implementation: openstack.nova_plugin.server.stop + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.nova_plugin.server.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + reboot: + implementation: openstack.nova_plugin.server.reboot + inputs: + reboot_type: + type: string + default: soft + # suspend/resume + cloudify.interfaces.freeze: + suspend: + implementation: openstack.nova_plugin.server.freeze_suspend + inputs: {} + resume: + implementation: openstack.nova_plugin.server.freeze_resume + inputs: {} + # backups related section + cloudify.interfaces.snapshot: + create: + implementation: openstack.nova_plugin.server.snapshot_create + inputs: {} + apply: + implementation: openstack.nova_plugin.server.snapshot_apply + inputs: {} + delete: + implementation: openstack.nova_plugin.server.snapshot_delete + inputs: {} + cloudify.interfaces.validation: + creation: + implementation: openstack.nova_plugin.server.creation_validation + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.nova_plugin.server.list_servers + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.WindowsServer: + derived_from: cloudify.openstack.nodes.Server + properties: + use_password: + type: boolean + default: true + description: > + Default changed for derived type + because Windows instances need a password for agent installation + os_family: + type: string + default: windows + description: > + (updates the os_family default as a convenience) + agent_config: + type: cloudify.datatypes.AgentConfig + default: + port: 5985 + description: > + (updates the defaults for the agent_config for Windows) + + cloudify.openstack.nodes.KeyPair: + derived_from: cloudify.nodes.Root + properties: + keypair: + default: {} + description: > + The keypair object as described in Openstack compute API (create keypair method): + https://developer.openstack.org/api-ref/compute/#keypairs-keypairs. + This parameter can be used to override and pass parameters directly to Nova client. + Note that in the case of keypair, the only nested parameter that can be used is "name". + private_key_path: + type: string + description: > + the path (on the machine the plugin is running on) to + where the private key should be stored. If + use_external_resource is set to "true", the existing + private key is expected to be at this path. + Deprecated. Please do not use private_key_path. + required: false + use_external_resource: + type: boolean + default: false + description: > + a boolean describing whether this resource should be + created or rather that it already exists on Openstack + and should be used as-is. + create_if_missing: + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + the name that will be given to the resource on Openstack (excluding optional prefix). + If not provided, a default name will be given instead. + If use_external_resource is set to "true", this exact + value (without any prefixes applied) will be looked for + as either the name or id of an existing keypair to be used. + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.nova_plugin.keypair.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.nova_plugin.keypair.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.nova_plugin.keypair.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.nova_plugin.keypair.list_keypairs + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.Subnet: + derived_from: cloudify.nodes.Subnet + properties: + subnet: + default: {} + description: > + The subnet object as described in Openstack networking API (create subnet method): + https://developer.openstack.org/api-ref/network/v2/index.html#subnets. + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.neutron_plugin.subnet.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.neutron_plugin.subnet.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.neutron_plugin.subnet.creation_validation + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.neutron_plugin.subnet.list_subnets + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.SecurityGroup: + derived_from: cloudify.nodes.SecurityGroup + properties: + security_group: + default: {} + description: > + The security-group object as described in Openstack networking API (create security-group method): + https://developer.openstack.org/api-ref/network/v2/index.html#security-groups-security-groups. + description: + type: string + default: '' + description: > + SecurityGroup description. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + rules: + default: [] + description: > + key-value security_group_rule configuration as described in: + https://developer.openstack.org/api-ref/network/v2/index.html#security-group-rules-security-group-rules. + disable_default_egress_rules: + type: boolean + default: false + description: > + a flag for removing the default rules which https://wiki.openstack.org/wiki/Neutron/SecurityGroups#Behavior. If not set to `true`, these rules will remain, and exist alongside any additional rules passed using the `rules` property. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.neutron_plugin.security_group.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.neutron_plugin.security_group.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.neutron_plugin.security_group.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.neutron_plugin.security_group.list_security_groups + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.Router: + derived_from: cloudify.nodes.Router + properties: + router: + default: {} + description: > + The router object as described in Openstack networking API (create router method): + https://developer.openstack.org/api-ref/network/v2/index.html#routers-routers. + external_network: + type: string + default: '' + description: > + An external network name or ID. + If given, the router will use this external network as a gateway. + default_to_managers_external_network: + type: boolean + default: true + description: > + A boolean which determines whether to use the Cloudify Manager's external network if no other external network was given (whether by a relationship, by the `external_network` property or by the nested `external_gateway_info` key in the `router` property). This is only relevant if the manager's external network appears in the Provider-context. Defaults to `true`. + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.neutron_plugin.router.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.neutron_plugin.router.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.neutron_plugin.router.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + update: + implementation: openstack.neutron_plugin.router.update + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + list: + implementation: openstack.neutron_plugin.router.list_routers + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.Routes: + derived_from: cloudify.nodes.Root + properties: + routes: + default: [] + description: > + The extra routes configuration for L3 router. + A list of dictionaries with destination and nexthop parameters. + It is available when extraroute extension is enabled. + Default is an empty list ([]). + https://developer.openstack.org/api-ref/network/v2/index.html#update-router + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.neutron_plugin.router.add_routes + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.neutron_plugin.router.delete_routes + + cloudify.openstack.nodes.Port: + derived_from: cloudify.nodes.Port + properties: + port: + default: {} + description: > + The port object as described in Openstack networking API (create port method): + https://developer.openstack.org/api-ref-networking-v2.html#ports. + fixed_ip: + type: string + default: '' + description: > + may be used to request a specific fixed IP for the port. + If the IP is unavailable + (either already taken or does not belong to a subnet the port is on) + an error will be raised. + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.neutron_plugin.port.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.neutron_plugin.port.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.neutron_plugin.port.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.neutron_plugin.port.list_ports + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.Network: + derived_from: cloudify.nodes.Network + properties: + network: + default: {} + description: > + The network object as described in Openstack networking API (create network method): + https://developer.openstack.org/api-ref-networking-v2.html#networks. + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.neutron_plugin.network.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.neutron_plugin.network.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.neutron_plugin.network.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.neutron_plugin.network.list_networks + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.FloatingIP: + derived_from: cloudify.nodes.VirtualIP + properties: + floatingip: + default: {} + description: > + The floatingip object as described in Openstack networking API (create floatingip method): + https://developer.openstack.org/api-ref/network/v2/index.html#floating-ips-floatingips + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + allow_reallocation: + type: boolean + default: false + description: > + (Applicable only when use_external_resource is true) + If true, then allow using this floating IP even if it has already been allocated to + another instance. If false, and the floating IP is already allocated (that is, it is + in 'ACTIVE' state), a recoverable error is raised. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + description: IP address of the floating IP + default: '' + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.neutron_plugin.floatingip.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.neutron_plugin.floatingip.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.neutron_plugin.floatingip.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.neutron_plugin.floatingip.list_floatingips + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.RBACPolicy: + derived_from: cloudify.nodes.Root + properties: + rbac_policy: + default: {} + description: > + The RBAC policy object as described in Openstack networking API (create RBAC policy method): + https://developer.openstack.org/api-ref/network/v2/#create-rbac-policy + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.neutron_plugin.rbac_policy.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.neutron_plugin.rbac_policy.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.neutron_plugin.rbac_policy.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.neutron_plugin.rbac_policy.list_rbac_policies + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + find_and_delete: + implementation: openstack.neutron_plugin.rbac_policy.find_and_delete + inputs: + args: + default: {} + openstack_config: + default: {} + + cloudify.openstack.nodes.Volume: + derived_from: cloudify.nodes.Volume + properties: + volume: + default: {} + description: > + The volume object as described in Openstack block-storage API (create volume method): + https://developer.openstack.org/api-ref/block-storage/v2/index.html#volumes-volumes. + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + device_name: + type: string + default: auto + description: > + The device name this volume will be attached to. + Default value is *auto*, + which means openstack will auto-assign a device. + Note that if you do explicitly set a value, + this value may not be the actual device name assigned. + Sometimes the device requested will not be available and openstack will assign it to a different device, + this is why we recommend using *auto*. + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + boot: + type: boolean + required: false + description: > + If a Server instance is connected to this Volume by a relationship, + this volume will be used as the boot volume for that Server. + This option will be deprecated in the future. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.cinder_plugin.volume.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + status_attempts: + description: > + Number of times to check for the creation's status before failing + type: integer + default: 20 + status_timeout: + description: > + Interval (in seconds) between subsequent inquiries of the creation's + status + type: integer + default: 15 + delete: + implementation: openstack.cinder_plugin.volume.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + # backups related section + cloudify.interfaces.snapshot: + create: + implementation: openstack.cinder_plugin.volume.snapshot_create + inputs: {} + apply: + implementation: openstack.cinder_plugin.volume.snapshot_apply + inputs: {} + delete: + implementation: openstack.cinder_plugin.volume.snapshot_delete + inputs: {} + cloudify.interfaces.validation: + creation: + implementation: openstack.cinder_plugin.volume.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.cinder_plugin.volume.list_volumes + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nova_net.nodes.FloatingIP: + derived_from: cloudify.nodes.VirtualIP + properties: + floatingip: + default: {} + description: > + The os-floating-ip object as described in Openstack compute API (create os-floating-ip method): + https://developer.openstack.org/api-ref/compute/#floating-ips-os-floating-ips-deprecated. + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + TODO: CREATE. THIS IS MISSING + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.nova_plugin.floatingip.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.nova_plugin.floatingip.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.nova_plugin.floatingip.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + + cloudify.openstack.nova_net.nodes.SecurityGroup: + derived_from: cloudify.nodes.SecurityGroup + properties: + security_group: + default: {} + description: > + The os-security-group object as described in Openstack compute API (create os-security-group method): + https://developer.openstack.org/api-ref/compute/#security-groups-os-security-groups-deprecated + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + TODO: CREATE. THIS IS MISSING + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + rules: + default: [] + description: > + key-value security group rule as described in: + https://developer.openstack.org/api-ref/compute/#rules-for-security-group-os-security-group-rules-deprecated. + description: + type: string + description: security group description + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.nova_plugin.security_group.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + status_attempts: + description: > + Number of times to check for the attachment's status before failing + type: integer + default: 10 + status_timeout: + description: > + Interval (in seconds) between subsequent inquiries of the attachment's + status + type: integer + default: 2 + delete: + implementation: openstack.nova_plugin.security_group.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.nova_plugin.security_group.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.Flavor: + derived_from: cloudify.nodes.Root + properties: + flavor: + default: {} + description: > + key-value user configuration, according to: + https://developer.openstack.org/api-ref/compute/#create-flavor + extra_specs: + default: {} + description: > + key-value user configuration, according to: + https://developer.openstack.org/api-ref/compute/#create-extra-specs-for-a-flavor + tenants: + default: [] + description: > + List of tenants to add to flavor access + use_external_resource: + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.nova_plugin.flavor.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.nova_plugin.flavor.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.nova_plugin.flavor.list_flavors + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.Image: + derived_from: cloudify.nodes.Root + properties: + image: + description: > + The image object as described in Openstack image API (create image method): + https://developer.openstack.org/api-ref/image/v2/index.html#images + Required parameters are (container_format, disk_format). + To create an image from the local file its path should be added in data parameter. + default: {} + image_url: + type: string + default: '' + description: > + The openstack resource URL for the image. + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.glance_plugin.image.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + start: + implementation: openstack.glance_plugin.image.start + inputs: + start_retry_interval: + type: integer + default: 30 + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.glance_plugin.image.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.glance_plugin.image.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + update: + implementation: openstack.glance_plugin.image.update + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + list: + implementation: openstack.glance_plugin.image.list_images + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.Project: + derived_from: cloudify.nodes.Root + properties: + project: + default: {} + description: > + The project object as described in Openstack identity API (create project method): + https://developer.openstack.org/api-ref/identity/v3/#projects + users: + default: [] + description: > + List of users assigned to this project in the following format: + { name: string, roles: [string] } + quota: + default: {} + description: | + A dictionary mapping service names to quota definitions for a projct + + e.g:: + + quota: + neutron: + nova: + use_external_resource: + type: boolean + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.keystone_plugin.project.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + start: + implementation: openstack.keystone_plugin.project.start + inputs: + quota_dict: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.keystone_plugin.project.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + update_project: + implementation: openstack.keystone_plugin.project.update_project + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + get_quota: + implementation: openstack.keystone_plugin.project.get_project_quota + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + update_quota: + implementation: openstack.keystone_plugin.project.update_project_quota + inputs: + quota: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + list: + implementation: openstack.keystone_plugin.project.list_projects + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: openstack.keystone_plugin.project.creation_validation + + + cloudify.openstack.nodes.User: + derived_from: cloudify.nodes.Root + properties: + user: + default: {} + description: > + The user object as described in Openstack identity API (create user method): + https://developer.openstack.org/api-ref/identity/v3/#users + use_external_resource: + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.keystone_plugin.user.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.keystone_plugin.user.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + update: + implementation: openstack.keystone_plugin.user.update + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + list: + implementation: openstack.keystone_plugin.user.list_users + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + + cloudify.openstack.nodes.HostAggregate: + derived_from: cloudify.nodes.Root + properties: + aggregate: + default: {} + description: > + The host-aggregate object as described in Openstack compute API (create host-aggregate method): + https://developer.openstack.org/api-ref/compute/#host-aggregates-os-aggregates + hosts: + required: false + description: > + list of hosts IDs, which will be a members of host aggregate + metadata: + required: false + description: > + metadata entries in : format + use_external_resource: + default: false + description: > + a boolean for setting whether to create the resource or use an existing one. + See the using existing resources section. + create_if_missing: + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + default: '' + description: > + name to give to the new resource or the name or ID of an existing resource when the ``use_external_resource`` property is set to ``true`` (see the using existing resources section). Defaults to '' (empty string). + openstack_config: + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.nova_plugin.host_aggregate.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.nova_plugin.host_aggregate.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + update: + implementation: openstack.nova_plugin.host_aggregate.update + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + list: + implementation: openstack.nova_plugin.host_aggregate.list_host_aggregates + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + add_hosts: + implementation: openstack.nova_plugin.host_aggregate.add_hosts + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + hosts: + default: [] + remove_hosts: + implementation: openstack.nova_plugin.host_aggregate.remove_hosts + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + hosts: + default: [] + + cloudify.openstack.nodes.ServerGroup: + derived_from: cloudify.nodes.Root + properties: + server_group: + description: > + The server-group object as described in Openstack compute API (create server-group method): + https://developer.openstack.org/api-ref/compute/#server-groups-os-server-groups + default: {} + policy: + type: string + description: > + the policy of the server group, this must be either 'affinity', + 'anti-affinity', 'soft-affinity', or 'soft-anti-affinity'. + use_external_resource: + type: boolean + default: false + description: > + a boolean describing whether this resource should be + created or rather that it already exists on Openstack + and should be used as-is. + create_if_missing: + type: boolean + default: false + description: > + If use_external_resource is ``true`` and the resource is missing, + create it instead of failing. + resource_id: + type: string + default: '' + description: > + the name that will be given to the resource on Openstack (excluding optional prefix). + If not provided, a default name will be given instead. + If use_external_resource is set to "true", this exact + value (without any prefixes applied) will be looked for + as either the name or id of an existing server group to be used. + openstack_config: + type: cloudify.openstack.types.configuration + default: {} + description: > + endpoints and authentication configuration for Openstack. + Expected to contain the following nested fields: + username, password, tenant_name, auth_url, region. + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: openstack.nova_plugin.server_group.create + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + delete: + implementation: openstack.nova_plugin.server_group.delete + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.validation: + creation: + implementation: openstack.nova_plugin.server_group.creation_validation + inputs: + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + cloudify.interfaces.operations: + list: + implementation: openstack.nova_plugin.server_group.list_servergroups + inputs: + args: + default: {} + openstack_config: + default: {} + resource_id: + type: string + default: { get_property: [ SELF, resource_id ] } + +relationships: + cloudify.openstack.port_connected_to_security_group: + derived_from: cloudify.relationships.connected_to + source_interfaces: + cloudify.interfaces.relationship_lifecycle: + establish: + implementation: openstack.neutron_plugin.port.connect_security_group + inputs: + openstack_config: + default: {} + unlink: + implementation: openstack.neutron_plugin.port.disconnect_security_group + inputs: + openstack_config: + default: {} + + cloudify.openstack.subnet_connected_to_router: + derived_from: cloudify.relationships.connected_to + target_interfaces: + cloudify.interfaces.relationship_lifecycle: + postconfigure: + implementation: openstack.neutron_plugin.router.connect_subnet + inputs: + openstack_config: + default: {} + unlink: + implementation: openstack.neutron_plugin.router.disconnect_subnet + inputs: + openstack_config: + default: {} + + cloudify.openstack.server_connected_to_floating_ip: + derived_from: cloudify.relationships.connected_to + source_interfaces: + cloudify.interfaces.relationship_lifecycle: + establish: + implementation: openstack.nova_plugin.server.connect_floatingip + inputs: + fixed_ip: + description: > + The fixed IP to be associated with the floating IP. + If omitted, Openstack will choose which port to associate. + type: string + default: '' + openstack_config: + default: {} + unlink: + implementation: openstack.nova_plugin.server.disconnect_floatingip + inputs: + openstack_config: + default: {} + + cloudify.openstack.port_connected_to_floating_ip: + derived_from: cloudify.relationships.connected_to + source_interfaces: + cloudify.interfaces.relationship_lifecycle: + establish: + implementation: openstack.neutron_plugin.floatingip.connect_port + inputs: + openstack_config: + default: {} + unlink: + implementation: openstack.neutron_plugin.floatingip.disconnect_port + inputs: + openstack_config: + default: {} + + cloudify.openstack.server_connected_to_security_group: + derived_from: cloudify.relationships.connected_to + source_interfaces: + cloudify.interfaces.relationship_lifecycle: + establish: + implementation: openstack.nova_plugin.server.connect_security_group + inputs: + openstack_config: + default: {} + unlink: + implementation: openstack.nova_plugin.server.disconnect_security_group + inputs: + openstack_config: + default: {} + + cloudify.openstack.server_connected_to_port: + derived_from: cloudify.relationships.connected_to + source_interfaces: + cloudify.interfaces.relationship_lifecycle: + establish: + implementation: openstack.neutron_plugin.port.attach + inputs: + openstack_config: + default: {} + unlink: + implementation: openstack.neutron_plugin.port.detach + inputs: + openstack_config: + default: {} + + cloudify.openstack.server_connected_to_keypair: + derived_from: cloudify.relationships.connected_to + + cloudify.openstack.port_connected_to_subnet: + derived_from: cloudify.relationships.connected_to + + cloudify.openstack.volume_attached_to_server: + derived_from: cloudify.relationships.connected_to + target_interfaces: + cloudify.interfaces.relationship_lifecycle: + establish: + implementation: openstack.nova_plugin.server.attach_volume + inputs: + openstack_config: + default: {} + status_attempts: + description: > + Number of times to check for the attachment's status before failing + type: integer + default: 10 + status_timeout: + description: > + Interval (in seconds) between subsequent inquiries of the attachment's + status + type: integer + default: 2 + unlink: + implementation: openstack.nova_plugin.server.detach_volume + inputs: + openstack_config: + default: {} + status_attempts: + description: > + Number of times to check for the detachment's status before failing + type: integer + default: 10 + status_timeout: + description: > + Interval (in seconds) between subsequent inquiries of the detachment's + status + type: integer + default: 2 + + cloudify.openstack.server_connected_to_server_group: + derived_from: cloudify.relationships.connected_to + + cloudify.openstack.rbac_policy_applied_to: + derived_from: cloudify.relationships.connected_to + + cloudify.openstack.route_connected_to_router: + derived_from: cloudify.relationships.connected_to diff --git a/python311.patch b/python311.patch new file mode 100644 index 00000000..7b3392ba --- /dev/null +++ b/python311.patch @@ -0,0 +1,31 @@ +diff --git a/constraints.txt b/constraints.txt +index 1587762..7591270 100644 +--- a/constraints.txt ++++ b/constraints.txt +@@ -2,4 +2,4 @@ oslo.config==7.0.0 + subprocess32==3.5.3 + pyrsistent===0.16.1 + openstacksdk===0.15.0 +-cloudify-common>=5.1.0 ++cloudify-common>=7.0.0 +diff --git a/setup.py b/setup.py +index 43c8b3d..214ad49 100644 +--- a/setup.py ++++ b/setup.py +@@ -42,12 +42,14 @@ setup( + 'neutron_plugin', + 'cinder_plugin', + 'glance_plugin', +- 'keystone_plugin' ++ 'keystone_plugin', ++ 'pydoc', ++ 'webbrowser', + ], + license='LICENSE', + description='Cloudify plugin for OpenStack infrastructure.', + install_requires=[ +- 'cloudify-common>=4.6,<7.0.0', ++ 'cloudify-common>=7.0.0', + 'keystoneauth1>=2.16.0,<3', + 'python-novaclient==7.0.0', + 'python-keystoneclient==3.5.0', diff --git a/setup.py b/setup.py index 9ff54bb2..43c8b3d0 100644 --- a/setup.py +++ b/setup.py @@ -14,24 +14,20 @@ # * limitations under the License. import os -from setuptools import setup +import re +import pathlib +from setuptools import setup +from setuptools import find_packages -def read(rel_path): - here = os.path.abspath(os.path.dirname(__file__)) - with open(os.path.join(here, rel_path), 'r') as fp: - return fp.read() +VERSION_FILE = 'openstack_plugin_common/__version__.py' -def get_version(rel_file='plugin.yaml'): - lines = read(rel_file) - for line in lines.splitlines(): - if 'package_version' in line: - split_line = line.split(':') - line_no_space = split_line[-1].replace(' ', '') - line_no_quotes = line_no_space.replace('\'', '') - return line_no_quotes.strip('\n') - raise RuntimeError('Unable to find version string.') +def get_version(): + current_dir = pathlib.Path(__file__).parent.resolve() + with open(os.path.join(current_dir, VERSION_FILE), 'r') as outfile: + var = outfile.read() + return re.search(r'\d+.\d+.\d+', var).group() setup( @@ -51,7 +47,7 @@ def get_version(rel_file='plugin.yaml'): license='LICENSE', description='Cloudify plugin for OpenStack infrastructure.', install_requires=[ - 'cloudify-common>=4.6', + 'cloudify-common>=4.6,<7.0.0', 'keystoneauth1>=2.16.0,<3', 'python-novaclient==7.0.0', 'python-keystoneclient==3.5.0', diff --git a/test-requirements.txt b/test-requirements.txt index 10df238e..42f64db0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,9 +1,7 @@ -# For integration tests -pytest==4.6.3 -pyyaml==3.12 -coverage==3.7.1 +mock nose +pytest +pyyaml +coverage nose-cov -mock testfixtures -networkx==1.9.1 diff --git a/v2_plugin.yaml b/v2_plugin.yaml index 1f6f7fe7..6bb912f9 100644 --- a/v2_plugin.yaml +++ b/v2_plugin.yaml @@ -6,7 +6,7 @@ plugins: openstack: executor: central_deployment_agent package_name: cloudify-openstack-plugin - package_version: '2.14.25' + package_version: '2.14.26' data_types: cloudify.openstack.types.custom_configuration: