Move Rackspace resources into contrib

Using plain discover to run tests in contrib until
I can figure out how to make that work via testr.

Closes bug: 1220798

Change-Id: I5669b90152efabfacbc4b786a67cd1f4b139521a
This commit is contained in:
Randall Burt 2013-09-09 18:02:49 -05:00
parent cf38339328
commit 3991797483
15 changed files with 46 additions and 20 deletions

View File

@ -0,0 +1,19 @@
# Heat resources for working with the Rackspace Cloud
The resources and configuration in this module are for using Heat with the Rackspace Cloud. These resources either
allow using Rackspace services that don't have equivalent services in Openstack or account for differences between
a generic Openstack deployment and Rackspace Cloud.
## Resources
The following resources are provided for compatibility:
* `Rackspace::Cloud::Server`:
>Provide compatibility with `OS::Nova::Server` and allow for working `user_data` and `Metadata`. This is deprecated and should be replaced with `OS::Nova::Server` once service compatibility is implemented by Rackspace.
* `Rackspace::Cloud::LoadBalancer`:
>Use the Rackspace Cloud Loadbalancer service; not compatible with `OS::Neutron::LoadBalancer`.
* `Rackspace::Cloud::DatabaseInstance`:
>Use the Rackspace implementation of Trove. This is deprecated and should eventually be replaced with `OS::Trove::Instance` or similar.
## Usage
### Templates
### Configuration

View File

View File

View File

@ -1,5 +1,4 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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
@ -23,9 +22,10 @@ from heat.openstack.common import log as logging
from heat.openstack.common.gettextutils import _
from heat.engine import scheduler
from heat.engine.properties import Properties
from heat.engine.resources.rackspace import rackspace_resource
from heat.common import exception
from . import rackspace_resource
logger = logging.getLogger(__name__)

View File

@ -22,9 +22,10 @@ from heat.openstack.common import log as logging
from heat.engine import scheduler
from heat.engine.resources import instance
from heat.engine.resources import nova_utils
from heat.engine.resources.rackspace import rackspace_resource
from heat.db.sqlalchemy import api as db_api
from . import rackspace_resource
logger = logging.getLogger(__name__)

View File

@ -21,9 +21,10 @@ except ImportError:
pass
from heat.common import exception
from heat.engine.resources.rackspace import rackspace_resource
from heat.openstack.common import log as logging
from . import rackspace_resource
logger = logging.getLogger(__name__)

View File

View File

@ -20,10 +20,11 @@ import copy
from heat.common import template_format
from heat.engine import scheduler
from heat.engine import resource
from heat.engine.resources.rackspace import cloud_loadbalancer as lb
from heat.tests.common import HeatTestCase
from heat.tests import utils
from ..engine.plugins import cloud_loadbalancer as lb
# The following fakes are for pyrax
@ -103,10 +104,10 @@ class FakeLoadBalancerClient(object):
self.VirtualIP = FakeVirtualIP
pass
def get(*args, **kwargs):
def get(self, *args, **kwargs):
pass
def create(*args, **kwargs):
def create(self, *args, **kwargs):
pass
@ -120,19 +121,19 @@ class FakeLoadBalancer(object):
self.VirtualIP = FakeVirtualIP
self.nodes = []
def get(*args, **kwargs):
def get(self, *args, **kwargs):
pass
def add_nodes(*args, **kwargs):
def add_nodes(self, *args, **kwargs):
pass
def add_ssl_termination(*args, **kwargs):
def add_ssl_termination(self, *args, **kwargs):
pass
def set_error_page(*args, **kwargs):
def set_error_page(self, *args, **kwargs):
pass
def add_access_list(*args, **kwargs):
def add_access_list(self, *args, **kwargs):
pass

View File

@ -17,11 +17,12 @@ from heat.common import template_format
from heat.engine import parser
from heat.engine import environment
from heat.engine import resource
from heat.engine.resources.rackspace import clouddatabase
from heat.openstack.common import uuidutils
from heat.tests.common import HeatTestCase
from heat.tests import utils
from ..engine.plugins import clouddatabase
wp_template = '''
{

View File

@ -24,12 +24,12 @@ from heat.engine import parser
from heat.engine import resource
from heat.engine import scheduler
from heat.engine import environment
from heat.engine.resources.rackspace import cloud_server
from heat.engine.resources.rackspace import rackspace_resource
from heat.openstack.common import uuidutils
from heat.tests.common import HeatTestCase
from heat.tests import utils
from ..engine.plugins import rackspace_resource
from ..engine.plugins import cloud_server
wp_template = '''
{

View File

@ -1,4 +0,0 @@
# pyrax client library is required to work with Rackspace cloud resources,
# such as rackspace cloud database, rackspace cloud servers etc...
# If pyrax client library is not installed, then heat-engine would not register
# the rackspace cloud resource providers.

View File

@ -1,5 +1,5 @@
[tox]
envlist = py26,py27,pep8
envlist = py26,py27,pep8,contrib
[testenv]
setenv = VIRTUAL_ENV={envdir}
@ -9,6 +9,13 @@ commands =
python tools/patch_tox_venv.py
python setup.py testr --slowest --testr-args='{posargs}'
[testenv:contrib]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
discover -s contrib/ {posargs}
flake8 --ignore=H304,F841,H201,H302,H306,H404 contrib
[testenv:pep8]
commands =
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage