Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Revert "Added support of overcloud os_cloud""
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Dec 24, 2019
2 parents 227cd60 + fd7b5f2 commit 6cfb31f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 154 deletions.
3 changes: 1 addition & 2 deletions setup.cfg
Expand Up @@ -97,7 +97,6 @@ mistral.actions =
tripleo.deployment.get_deployment_status = tripleo_common.actions.deployment:DeploymentStatusAction
tripleo.deployment.convert_status = tripleo_common.actions.deployment:ConvertStatusAction
tripleo.deployment.overcloudrc = tripleo_common.actions.deployment:OvercloudRcAction
tripleo.deployment.createcloudsyaml = tripleo_common.actions.deployment:CreateCloudsYamlAction
tripleo.derive_params.convert_number_to_range_list = tripleo_common.actions.derive_params:ConvertNumberToRangeListAction
tripleo.derive_params.convert_range_to_number_list = tripleo_common.actions.derive_params:ConvertRangeToNumberListAction
tripleo.derive_params.get_dpdk_nics_numa_info = tripleo_common.actions.derive_params:GetDpdkNicsNumaInfoAction
Expand Down Expand Up @@ -171,4 +170,4 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,releasenotes
builtins = _

[pycodestyle]
exclude = .eggs,.tox
exclude = .eggs,.tox
40 changes: 0 additions & 40 deletions tripleo_common/actions/deployment.py
Expand Up @@ -12,7 +12,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

import json
import logging
import os
Expand Down Expand Up @@ -323,45 +322,6 @@ def run(self, context):
region_name)


class CreateCloudsYamlAction(base.TripleOAction):
"""Generate the overcloud clouds.yaml contents for a plan
Given the name of a container, generate the overcloud clouds.yaml
contents needed to access the overcloud via the CLI.
"""

def __init__(self, container):
super(CreateCloudsYamlAction, self).__init__()
self.container = container

def run(self, context):
orchestration_client = self.get_orchestration_client(context)
swift = self.get_object_client(context)
stack = orchestration_client.stacks.get(self.container)
env = plan_utils.get_env(swift, self.container)
parameter_defaults = env['parameter_defaults']
passwords = env['passwords']
# Retrive values for cloud from a stack
admin_pass = parameter_defaults.get('AdminPassword',
passwords['AdminPassword'])
region_name = parameter_defaults.get('KeystoneRegion', 'regionOne')
cloud_name = stack.stack_name
auth_url = overcloudrc.get_overcloud_endpoint(stack).replace('/v2.0',
'')

# Create a dict needed for creating clouds.yaml
cloud = {cloud_name: {'auth': {'auth_url': auth_url,
'project_name': 'admin',
'project_domain_name': 'Default',
'username': 'admin',
'user_domain_name': 'Default',
'password': admin_pass},
'region_name': region_name,
'identity_api_version': 3}}

return cloud


class DeploymentFailuresAction(base.TripleOAction):
"""Return all of the failures (if any) from deploying the plan
Expand Down
4 changes: 0 additions & 4 deletions tripleo_common/constants.py
Expand Up @@ -215,7 +215,3 @@
DEFAULT_STEPS_MAX = 6

PER_STEP_TASKS = ['upgrade_tasks', 'deploy_steps_tasks']

# Global Directories for clouds.yaml
GLOBAL_OS_DIR = '/etc/openstack'
CLOUDS_YAML_FILE = 'clouds.yaml'
74 changes: 0 additions & 74 deletions tripleo_common/utils/clouds_yaml.py

This file was deleted.

34 changes: 0 additions & 34 deletions workbooks/deployment.yaml
Expand Up @@ -755,40 +755,6 @@ workflows:
execution: <% execution() %>
message: <% $.get('message', '') %>

createcloudsyaml:
description: >
Generates the overcloud clouds.yaml
It requires container and queue name as a input.
tags:
- tripleo-common-managed

input:
- container: overcloud
- queue_name: tripleo

tasks:
generate_cloudyaml:
action: tripleo.deployment.createcloudsyaml
input:
container: <% $.container %>
on-complete: send_message
publish-on-error:
status: FAILED
message: <% task().result %>
publish:
status: SUCCESS
message: <% task().result %>

send_message:
workflow: tripleo.messaging.v1.send
input:
queue_name: <% $.queue_name %>
type: <% execution().name %>
status: <% $.status %>
execution: <% execution() %>
message: <% $.get('message', '') %>

get_deployment_status:
description: >
Get deployment status and update it if needed based on stack and
Expand Down

0 comments on commit 6cfb31f

Please sign in to comment.