Merge "Switch to plugin base: context, sla, runners"
This commit is contained in:
@@ -82,13 +82,6 @@ class _EndpointType(utils.ImmutableMixin, utils.EnumMixin):
|
|||||||
PUBLIC = "public"
|
PUBLIC = "public"
|
||||||
|
|
||||||
|
|
||||||
class _RunnerType(utils.ImmutableMixin, utils.EnumMixin):
|
|
||||||
SERIAL = "serial"
|
|
||||||
CONSTANT = "constant"
|
|
||||||
CONSTANT_FOR_DURATION = "constant_for_duration"
|
|
||||||
RPS = "rps"
|
|
||||||
|
|
||||||
|
|
||||||
class _Service(utils.ImmutableMixin, utils.EnumMixin):
|
class _Service(utils.ImmutableMixin, utils.EnumMixin):
|
||||||
"""OpenStack services names, by rally convention."""
|
"""OpenStack services names, by rally convention."""
|
||||||
|
|
||||||
@@ -171,7 +164,6 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin):
|
|||||||
TaskStatus = _TaskStatus()
|
TaskStatus = _TaskStatus()
|
||||||
DeployStatus = _DeployStatus()
|
DeployStatus = _DeployStatus()
|
||||||
EndpointPermission = _EndpointPermission()
|
EndpointPermission = _EndpointPermission()
|
||||||
RunnerType = _RunnerType()
|
|
||||||
ServiceType = _ServiceType()
|
ServiceType = _ServiceType()
|
||||||
Service = _Service()
|
Service = _Service()
|
||||||
EndpointType = _EndpointType()
|
EndpointType = _EndpointType()
|
||||||
|
@@ -1498,7 +1498,7 @@ class FakeTimer(rally_utils.Timer):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
@context.context("fake", order=1)
|
@context.context(name="fake", order=1)
|
||||||
class FakeContext(context.Context):
|
class FakeContext(context.Context):
|
||||||
|
|
||||||
CONFIG_SCHEMA = {
|
CONFIG_SCHEMA = {
|
||||||
@@ -1519,6 +1519,7 @@ class FakeContext(context.Context):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@context.context(name="fake_user_context", order=1)
|
||||||
class FakeUserContext(FakeContext):
|
class FakeUserContext(FakeContext):
|
||||||
|
|
||||||
admin = {
|
admin = {
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
|
from rally.benchmark import context
|
||||||
from rally.plugins.openstack.context.vm import custom_image
|
from rally.plugins.openstack.context.vm import custom_image
|
||||||
from tests.unit import test
|
from tests.unit import test
|
||||||
|
|
||||||
@@ -24,6 +25,7 @@ from tests.unit import test
|
|||||||
BASE = "rally.plugins.openstack.context.vm.custom_image"
|
BASE = "rally.plugins.openstack.context.vm.custom_image"
|
||||||
|
|
||||||
|
|
||||||
|
@context.context(name="test_custom_image", order=500)
|
||||||
class TestImageGenerator(custom_image.BaseCustomImageGenerator):
|
class TestImageGenerator(custom_image.BaseCustomImageGenerator):
|
||||||
def _customize_image(self, *args):
|
def _customize_image(self, *args):
|
||||||
pass
|
pass
|
||||||
@@ -37,7 +39,7 @@ class BaseCustomImageContextVMTestCase(test.TestCase):
|
|||||||
self.context = {
|
self.context = {
|
||||||
"task": mock.MagicMock(),
|
"task": mock.MagicMock(),
|
||||||
"config": {
|
"config": {
|
||||||
"custom_image": {
|
"test_custom_image": {
|
||||||
"image": {"name": "image"},
|
"image": {"name": "image"},
|
||||||
"flavor": {"name": "flavor"},
|
"flavor": {"name": "flavor"},
|
||||||
"username": "fedora",
|
"username": "fedora",
|
||||||
|
Reference in New Issue
Block a user