Remove orchestration scenarios
The only test in this package was skipped, and has
had a working equivalent in the heat functional job
for some time now.
Change-Id: Ic542eefcd09c3d55ac69c22e35eb1f47d1a99363
diff --git a/tempest/scenario/orchestration/__init__.py b/tempest/scenario/orchestration/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/tempest/scenario/orchestration/__init__.py
+++ /dev/null
diff --git a/tempest/scenario/orchestration/cfn_init_signal.yaml b/tempest/scenario/orchestration/cfn_init_signal.yaml
deleted file mode 100644
index c95aabf..0000000
--- a/tempest/scenario/orchestration/cfn_init_signal.yaml
+++ /dev/null
@@ -1,82 +0,0 @@
-HeatTemplateFormatVersion: '2012-12-12'
-Description: |
- Template which uses a wait condition to confirm that a minimal
- cfn-init and cfn-signal has worked
-Parameters:
- key_name:
- Type: String
- flavor:
- Type: String
- image:
- Type: String
- network:
- Type: String
- timeout:
- Type: Number
-Resources:
- CfnUser:
- Type: AWS::IAM::User
- SmokeSecurityGroup:
- Type: AWS::EC2::SecurityGroup
- Properties:
- GroupDescription: Enable only ping and SSH access
- SecurityGroupIngress:
- - {CidrIp: 0.0.0.0/0, FromPort: '-1', IpProtocol: icmp, ToPort: '-1'}
- - {CidrIp: 0.0.0.0/0, FromPort: '22', IpProtocol: tcp, ToPort: '22'}
- SmokeKeys:
- Type: AWS::IAM::AccessKey
- Properties:
- UserName: {Ref: CfnUser}
- SmokeServer:
- Type: OS::Nova::Server
- Metadata:
- AWS::CloudFormation::Init:
- config:
- files:
- /tmp/smoke-status:
- content: smoke test complete
- /etc/cfn/cfn-credentials:
- content:
- Fn::Replace:
- - SmokeKeys: {Ref: SmokeKeys}
- SecretAccessKey:
- 'Fn::GetAtt': [SmokeKeys, SecretAccessKey]
- - |
- AWSAccessKeyId=SmokeKeys
- AWSSecretKey=SecretAccessKey
- mode: '000400'
- owner: root
- group: root
- Properties:
- image: {Ref: image}
- flavor: {Ref: flavor}
- key_name: {Ref: key_name}
- security_groups:
- - {Ref: SmokeSecurityGroup}
- networks:
- - uuid: {Ref: network}
- user_data:
- Fn::Replace:
- - WaitHandle: {Ref: WaitHandle}
- - |
- #!/bin/bash -v
- /opt/aws/bin/cfn-init
- /opt/aws/bin/cfn-signal -e 0 --data "`cat /tmp/smoke-status`" \
- --id smoke_status "WaitHandle"
- WaitHandle:
- Type: AWS::CloudFormation::WaitConditionHandle
- WaitCondition:
- Type: AWS::CloudFormation::WaitCondition
- DependsOn: SmokeServer
- Properties:
- Handle: {Ref: WaitHandle}
- Timeout: {Ref: timeout}
-Outputs:
- WaitConditionStatus:
- Description: Contents of /tmp/smoke-status on SmokeServer
- Value:
- Fn::GetAtt: [WaitCondition, Data]
- SmokeServerIp:
- Description: IP address of server
- Value:
- Fn::GetAtt: [SmokeServer, first_address]
diff --git a/tempest/scenario/orchestration/test_server_cfn_init.py b/tempest/scenario/orchestration/test_server_cfn_init.py
deleted file mode 100644
index 53f7843..0000000
--- a/tempest/scenario/orchestration/test_server_cfn_init.py
+++ /dev/null
@@ -1,134 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# 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
-
-from tempest_lib import decorators
-
-from tempest import config
-from tempest import exceptions
-from tempest.openstack.common import log as logging
-from tempest.scenario import manager
-from tempest import test
-
-CONF = config.CONF
-LOG = logging.getLogger(__name__)
-
-
-class CfnInitScenarioTest(manager.OrchestrationScenarioTest):
-
- def setUp(self):
- super(CfnInitScenarioTest, self).setUp()
- if not CONF.orchestration.image_ref:
- raise self.skipException("No image available to test")
- self.client = self.orchestration_client
- self.template_name = 'cfn_init_signal.yaml'
-
- def assign_keypair(self):
- self.stack_name = self._stack_rand_name()
- if CONF.orchestration.keypair_name:
- self.keypair = None
- self.keypair_name = CONF.orchestration.keypair_name
- else:
- self.keypair = self.create_keypair()
- self.keypair_name = self.keypair['name']
-
- def launch_stack(self):
- net = self._get_default_network()
- self.parameters = {
- 'key_name': self.keypair_name,
- 'flavor': CONF.orchestration.instance_type,
- 'image': CONF.orchestration.image_ref,
- 'timeout': CONF.orchestration.build_timeout,
- 'network': net['id'],
- }
-
- # create the stack
- self.template = self._load_template(__file__, self.template_name)
- stack = self.client.create_stack(
- name=self.stack_name,
- template=self.template,
- parameters=self.parameters)
- stack = stack['stack']
-
- self.stack = self.client.get_stack(stack['id'])
- self.stack_identifier = '%s/%s' % (self.stack_name, self.stack['id'])
- self.addCleanup(self.delete_wrapper,
- self.orchestration_client.delete_stack,
- self.stack_identifier)
-
- def check_stack(self):
- sid = self.stack_identifier
- self.client.wait_for_resource_status(
- sid, 'WaitHandle', 'CREATE_COMPLETE')
- self.client.wait_for_resource_status(
- sid, 'SmokeSecurityGroup', 'CREATE_COMPLETE')
- self.client.wait_for_resource_status(
- sid, 'SmokeKeys', 'CREATE_COMPLETE')
- self.client.wait_for_resource_status(
- sid, 'CfnUser', 'CREATE_COMPLETE')
- self.client.wait_for_resource_status(
- sid, 'SmokeServer', 'CREATE_COMPLETE')
-
- server_resource = self.client.get_resource(sid, 'SmokeServer')
- server_id = server_resource['physical_resource_id']
- server = self.servers_client.get_server(server_id)
- server_ip =\
- server['addresses'][CONF.compute.network_for_ssh][0]['addr']
-
- if not self.ping_ip_address(
- server_ip, ping_timeout=CONF.orchestration.build_timeout):
- self._log_console_output(servers=[server])
- self.fail(
- "(CfnInitScenarioTest:test_server_cfn_init) Timed out waiting "
- "for %s to become reachable" % server_ip)
-
- try:
- self.client.wait_for_resource_status(
- sid, 'WaitCondition', 'CREATE_COMPLETE')
- except (exceptions.StackResourceBuildErrorException,
- exceptions.TimeoutException) as e:
- raise e
- finally:
- # attempt to log the server console regardless of WaitCondition
- # going to complete. This allows successful and failed cloud-init
- # logs to be compared
- self._log_console_output(servers=[server])
-
- self.client.wait_for_stack_status(sid, 'CREATE_COMPLETE')
-
- stack = self.client.get_stack(sid)
-
- # This is an assert of great significance, as it means the following
- # has happened:
- # - cfn-init read the provided metadata and wrote out a file
- # - a user was created and credentials written to the server
- # - a cfn-signal was built which was signed with provided credentials
- # - the wait condition was fulfilled and the stack has changed state
- wait_status = json.loads(
- self._stack_output(stack, 'WaitConditionStatus'))
- self.assertEqual('smoke test complete', wait_status['smoke_status'])
-
- if self.keypair:
- # Check that the user can authenticate with the generated
- # keypair
- self.get_remote_client(server_ip, username='ec2-user',
- log_console_of_servers=[server])
-
- @test.attr(type='slow')
- @decorators.skip_because(bug='1374175')
- @test.idempotent_id('2be9be1f-8106-4ee2-a7ba-444c7557db2f')
- @test.services('orchestration', 'compute')
- def test_server_cfn_init(self):
- self.assign_keypair()
- self.launch_stack()
- self.check_stack()