Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #57 from pjbreaux/release.initial_supported_templates
Browse files Browse the repository at this point in the history
Make initial release of this repo
  • Loading branch information
szakeri committed Apr 22, 2016
2 parents e53d35b + 86c616b commit 00bab1a
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 370 deletions.
23 changes: 23 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,29 @@ Contributing
------------
See `Contributing <CONTRIBUTING.md>`_.

Test
----
To run the functional tests here, please follow the guidelines below. `pytest <http://pytest.org>` is used for all functional testing in this repo.

Functional Tests
~~~~~~~~~~~~~~~~
Each Heat template makes different assumptions about what is available in the Openstack environment and what the template itself needs to create/manage. We have erred on the side of flexibility and customization because we realize your stack may be unique to you. The functionally tested templates may draw upon resources that already exist in Openstack and may manage its own resources when it makes sense. To understand what is needed to test a certain template, one has to merely look at the 'paramaters' input. This gives a clean indication of what is assumed to exist before launching the stack.

#. Install the required functional testing packages.

.. code:: shell
$ pip install -r requirements.func.test.txt
#. The pytest config options give below may not all be needed for a specific test. For example, if the test is not booting an F5® BIG-IP® via Heat then the '--license' option may not be required.

.. code:: shell
$ py.test <test_suite_file> --auth-netloc=<ip_address_of_keystone_host> --os-username=<openstack_username> \
--os-password=<openstack_password> --os-tenant-id=<id_of_tenant> --os-tenant-name=<openstack_tenant_name> \
--bigip-root-password=<password_for_root_username> --bigip-admin-password=<password_for_admin_username> \
--license=<license_key_for_ve_image>
Copyright
---------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ resources:
network: {get_param: network_1 }
security_groups: [{ get_attr: [bigip_data_security_group, data_security_group_id] }]
bigip_data_security_group:
type: https://raw.githubusercontent.com/pjbreaux/f5-openstack-heat-1/bugfix.teardown_glance_images/unsupported/ve/common/bigip_data_security_group.yaml
type: https://raw.githubusercontent.com/F5Networks/f5-openstack-heat/develop/unsupported/ve/common/bigip_data_security_group.yaml
bigip_mgmt_security_group:
type: https://raw.githubusercontent.com/pjbreaux/f5-openstack-heat-1/bugfix.teardown_glance_images/unsupported/ve/common/bigip_mgmt_security_group.yaml
type: https://raw.githubusercontent.com/F5Networks/f5-openstack-heat/develop/unsupported/ve/common/bigip_mgmt_security_group.yaml
floating_ip:
type: OS::Neutron::FloatingIP
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ parameter_groups:

resources:
bigip_data_security_group:
type: https://raw.githubusercontent.com/pjbreaux/f5-openstack-heat-1/bugfix.teardown_glance_images/unsupported/ve/common/bigip_data_security_group.yaml
type: https://raw.githubusercontent.com/F5Networks/f5-openstack-heat/develop/unsupported/ve/common/bigip_data_security_group.yaml
bigip_mgmt_security_group:
type: https://raw.githubusercontent.com/pjbreaux/f5-openstack-heat-1/bugfix.teardown_glance_images/unsupported/ve/common/bigip_mgmt_security_group.yaml
type: https://raw.githubusercontent.com/F5Networks/f5-openstack-heat/develop/unsupported/ve/common/bigip_mgmt_security_group.yaml
mgmt_port:
type: OS::Neutron::Port
properties:
Expand Down
15 changes: 12 additions & 3 deletions test/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def AuthAddress(request):


@pytest.fixture
def UnsupportedDir():
def BaseRepoDir():
base_repo_dir = \
os.path.dirname(
os.path.dirname(
Expand All @@ -60,5 +60,14 @@ def UnsupportedDir():
)
)
)
unsupported_dir = os.path.join(base_repo_dir, 'unsupported')
return unsupported_dir
return base_repo_dir


@pytest.fixture
def UnsupportedDir(BaseRepoDir):
return os.path.join(BaseRepoDir, 'unsupported')


@pytest.fixture
def SupportedDir(BaseRepoDir):
return os.path.join(BaseRepoDir, 'f5_supported')
4 changes: 2 additions & 2 deletions test/functional/ve/images/test_patch_upload_ve_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def teardown_glance_image():


@pytest.fixture
def PatchTemplateLoc(UnsupportedDir):
def PatchTemplateLoc(SupportedDir):
return os.path.join(
os.path.join(
UnsupportedDir, 've', 'images', 'patch_upload_ve_image.yaml'
SupportedDir, 've', 'images', 'patch_upload_ve_image.yaml'
)
)

Expand Down
10 changes: 6 additions & 4 deletions test/functional/ve/standalone/test_f5_base_instance_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ def check_net_components(bigip, ifc_num):


@pytest.fixture
def CommonTemplateDir(UnsupportedDir):
def CommonTemplateDir(SupportedDir):
return os.path.join(
os.path.join(
UnsupportedDir, 've', 'common'
SupportedDir, 've', 'standalone'
)
)


# These tests require a patched VE instance in your stack

def itest_f5_base_instance_deploy_2_nic_11_5_4(
def test_f5_base_instance_deploy_2_nic_11_5_4(
HeatStack, BigIPConfig, CommonTemplateDir
):
admin_password, root_password, license = BigIPConfig
Expand All @@ -103,6 +103,7 @@ def itest_f5_base_instance_deploy_2_nic_11_5_4(
've_image': BIGIP_11_5_4_IMG,
'external_network': 'external_network',
'mgmt_network': 'mgmt_net',
've_flavor': 'm1.xlarge',
'network_1': 'data1_net',
'f5_ve_os_ssh_key': 'testlab',
'admin_password': admin_password,
Expand Down Expand Up @@ -170,7 +171,7 @@ def test_f5_base_instance_deploy_2_nic_12_0(
check_net_components(bigip, 2)


def itest_f5_base_instance_deploy_3_nic_11_5_4(
def test_f5_base_instance_deploy_3_nic_11_5_4(
HeatStack, BigIPConfig, CommonTemplateDir
):
admin_password, root_password, license = BigIPConfig
Expand All @@ -179,6 +180,7 @@ def itest_f5_base_instance_deploy_3_nic_11_5_4(
'func_test_standalone_3_nic',
parameters={
've_image': BIGIP_11_5_4_IMG,
've_flavor': 'm1.xlarge',
'external_network': 'external_network',
'mgmt_network': 'mgmt_net',
'network_1': 'data1_net',
Expand Down
167 changes: 0 additions & 167 deletions unsupported/ve/standalone/f5_base_instance_deploy_2_nic.yaml

This file was deleted.

Loading

0 comments on commit 00bab1a

Please sign in to comment.