예제 #1
0
#
#         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.

from rally.common import cfg

OPTS = {
    "openstack": [
        cfg.StrOpt("img_url",
                   default="http://download.cirros-cloud.net/"
                   "0.3.5/cirros-0.3.5-x86_64-disk.img",
                   deprecated_group="tempest",
                   help="image URL"),
        cfg.StrOpt("img_disk_format",
                   default="qcow2",
                   deprecated_group="tempest",
                   help="Image disk format to use when creating the image"),
        cfg.StrOpt(
            "img_container_format",
            default="bare",
            deprecated_group="tempest",
            help="Image container format to use when creating the image"),
        cfg.StrOpt("img_name_regex",
                   default="^.*(cirros|testvm).*$",
                   deprecated_group="tempest",
                   help="Regular expression for name of a public image to "
예제 #2
0
#    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.

from rally.common import cfg

OPTS = {
    "openstack": [
        cfg.IntOpt("users_context_resource_management_workers",
                   default=20,
                   deprecated_name="resource_management_workers",
                   deprecated_group="users_context",
                   help="The number of concurrent threads to use for serving "
                   "users context."),
        cfg.StrOpt("project_domain",
                   default="default",
                   deprecated_group="users_context",
                   help="ID of domain in which projects will be created."),
        cfg.StrOpt("user_domain",
                   default="default",
                   deprecated_group="users_context",
                   help="ID of domain in which users will be created."),
        cfg.StrOpt("keystone_default_role",
                   default="member",
                   deprecated_group="users_context",
                   help="The default role name of the keystone to assign to "
                   "users.")
    ]
}
예제 #3
0
파일: context.py 프로젝트: lolwww/rally
import collections

from rally.common import cfg
from rally.common import logging
from rally.common.plugin import plugin
from rally.common import utils
from rally.common import validation
from rally.task import atomic
from rally.task import functional
from rally.task import utils as task_utils

LOG = logging.getLogger(__name__)
CONF = cfg.CONF
CONF_OPTS = [
    cfg.StrOpt(
        "context_resource_name_format",
        help="Template is used to generate random names of resources. X is "
        "replaced with random latter, amount of X can be adjusted")
]
CONF.register_opts(CONF_OPTS)


def configure(name, order, platform="default", hidden=False):
    """Context class wrapper.

    Each context class has to be wrapped by configure() wrapper. It
    sets essential configuration of context classes. Actually this wrapper just
    adds attributes to the class.

    :param name: Name of the class, used in the input task
    :param platform: str plugin's platform
    :param order: As far as we can use multiple context classes that sometimes
예제 #4
0
from rally.common import cfg
from rally.common import logging
from rally.common.plugin import plugin
from rally.common import utils
from rally.common import validation
from rally.task import atomic
from rally.task import functional
from rally.task import utils as task_utils

LOG = logging.getLogger(__name__)
CONF = cfg.CONF
CONF_OPTS = [
    cfg.StrOpt(
        "context_resource_name_format",
        help="A mktemp(1)-like format string that will be used to pattern "
        "the generated random string. It must contain two separate "
        "segments of at least three 'X's; the first one will be replaced "
        "by a portion of the owner ID (i.e task/subtask ID), and the "
        "second will be replaced with a random string.")
]
CONF.register_opts(CONF_OPTS)


def configure(name, order, platform="default", hidden=False):
    """Context class wrapper.

    Each context class has to be wrapped by configure() wrapper. It
    sets essential configuration of context classes. Actually this wrapper just
    adds attributes to the class.

    :param name: Name of the class, used in the input task
예제 #5
0
if rally_openstack.__rally_version__ < (1, 5, 0):
    # NOTE(andreykurilin): this is a workaround to make inheritance of
    #   OSProfilerChart clear.
    OutputEmbeddedChart = type("OutputEmbeddedChart", (object, ), {})
    OutputEmbeddedExternalChart = type("OutputEmbeddedExternalChart",
                                       (object, ), {})
else:
    OutputEmbeddedChart = charts.OutputEmbeddedChart
    OutputEmbeddedExternalChart = charts.OutputEmbeddedExternalChart

OPTS = {
    "openstack": [
        cfg.StrOpt(
            "osprofiler_chart_mode",
            default=None,
            help="Mode of embedding OSProfiler's chart. Can be 'text' "
            "(embed only trace id), 'raw' (embed raw osprofiler's native "
            "report) or a path to directory (raw osprofiler's native "
            "reports for each iteration will be saved separately there "
            "to decrease the size of rally report itself)")
    ]
}

LOG = logging.getLogger(__name__)
CONF = cfg.CONF


def _datetime_json_serialize(obj):
    if hasattr(obj, "isoformat"):
        return obj.isoformat()
    else:
        return obj
예제 #6
0
#    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.

from rally.common import cfg

KUBERNETES_OPTS = [
    cfg.FloatOpt("start_prepoll_delay",
                 default=0.0,
                 help="Time to sleep before polling for status"),
    cfg.IntOpt("status_total_retries",
               default=120,
               help="Kubernetes total retries to read resource status"),
    cfg.FloatOpt("status_poll_interval",
                 default=1.0,
                 help="Kubernetes status poll interval"),
    cfg.StrOpt("cert_dir",
               default="~/.rally/cert",
               help="Directory for storing certification files")
]


def list_opts():
    """Return a list of configuration options.

    This is entry-point which is configured via setup.cfg
    """

    return {"kubernetes": KUBERNETES_OPTS}