remove gnocchiclient cap
new ostestr is different and is breaking gate. i don't think we really need ostestr since we don't use it in any of the projects under Telemetry. so to remain consistent and simple, just follow similar pattern. Change-Id: I742de2107cf56ef8b223fa1431529e706cc52377 (cherry picked from commit6005f80f9b
) fix remaining usage of recently changed client init interface. fix req as we don't need it anymore. Related-Bug: #1714483 Change-Id: I3d7652d294d8082a5ef526d1e51add8056dc3114 (cherry picked from commit3227ae9377
)
This commit is contained in:
parent
591bdcc4c0
commit
2174215b8f
|
@ -78,9 +78,9 @@ class AlarmGnocchiThresholdRule(base.AlarmRule):
|
||||||
conf = pecan.request.cfg
|
conf = pecan.request.cfg
|
||||||
gnocchi_client = client.Client(
|
gnocchi_client = client.Client(
|
||||||
'1', keystone_client.get_session(conf),
|
'1', keystone_client.get_session(conf),
|
||||||
interface=conf.service_credentials.interface,
|
adapter_options={
|
||||||
region_name=conf.service_credentials.region_name)
|
'interface': conf.service_credentials.interface,
|
||||||
|
'region_name': conf.service_credentials.region_name})
|
||||||
try:
|
try:
|
||||||
return gnocchi_client.capabilities.list().get(
|
return gnocchi_client.capabilities.list().get(
|
||||||
'aggregation_methods', [])
|
'aggregation_methods', [])
|
||||||
|
@ -182,9 +182,9 @@ class AggregationMetricByResourcesLookupRule(AlarmGnocchiThresholdRule):
|
||||||
|
|
||||||
gnocchi_client = client.Client(
|
gnocchi_client = client.Client(
|
||||||
'1', keystone_client.get_session(conf),
|
'1', keystone_client.get_session(conf),
|
||||||
interface=conf.service_credentials.interface,
|
adapter_options={
|
||||||
region_name=conf.service_credentials.region_name)
|
'interface': conf.service_credentials.interface,
|
||||||
|
'region_name': conf.service_credentials.region_name})
|
||||||
try:
|
try:
|
||||||
gnocchi_client.metric.aggregation(
|
gnocchi_client.metric.aggregation(
|
||||||
metrics=rule.metric,
|
metrics=rule.metric,
|
||||||
|
|
|
@ -8,7 +8,7 @@ futures>=3.0;python_version=='2.7' or python_version=='2.6' # BSD
|
||||||
futurist>=0.11.0 # Apache-2.0
|
futurist>=0.11.0 # Apache-2.0
|
||||||
jsonschema!=2.5.0,<3.0.0,>=2.0.0
|
jsonschema!=2.5.0,<3.0.0,>=2.0.0
|
||||||
keystonemiddleware>=2.2.0
|
keystonemiddleware>=2.2.0
|
||||||
gnocchiclient>=3.1.0,<4.0.0 # Apache-2.0
|
gnocchiclient>=3.1.0 # Apache-2.0
|
||||||
lxml>=2.3
|
lxml>=2.3
|
||||||
oslo.db>=4.8.0,!=4.13.1,!=4.13.2,!=4.15.0 # Apache-2.0
|
oslo.db>=4.8.0,!=4.13.1,!=4.13.2,!=4.15.0 # Apache-2.0
|
||||||
oslo.config>=2.6.0 # Apache-2.0
|
oslo.config>=2.6.0 # Apache-2.0
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
export OS_TEST_PATH=aodh/tests/unit
|
||||||
|
./tools/pretty_tox.sh $*
|
||||||
|
|
||||||
|
export OS_TEST_PATH=aodh/tests/functional
|
||||||
AODH_TEST_DRIVERS=${AODH_TEST_DRIVERS:-postgresql}
|
AODH_TEST_DRIVERS=${AODH_TEST_DRIVERS:-postgresql}
|
||||||
for indexer in ${AODH_TEST_DRIVERS}
|
for indexer in ${AODH_TEST_DRIVERS}
|
||||||
do
|
do
|
||||||
|
|
|
@ -10,7 +10,7 @@ TESTRARGS=$*
|
||||||
#
|
#
|
||||||
# this work around exists until that is addressed
|
# this work around exists until that is addressed
|
||||||
if [[ "$TESTARGS" =~ "until-failure" ]]; then
|
if [[ "$TESTARGS" =~ "until-failure" ]]; then
|
||||||
ostestr --slowest $TESTRARGS
|
python setup.py testr --slowest --testr-args="$TESTRARGS"
|
||||||
else
|
else
|
||||||
ostestr --no-pretty --slowest --subunit $TESTRARGS | subunit-trace -f
|
python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f
|
||||||
fi
|
fi
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -17,7 +17,7 @@ setenv =
|
||||||
deps = .[test,{env:AODH_TEST_DEPS}]
|
deps = .[test,{env:AODH_TEST_DEPS}]
|
||||||
passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE AODH_TEST_DRIVERS
|
passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE AODH_TEST_DRIVERS
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/run-tests.sh --black-regex '^aodh\.tests\.tempest\..*$' {posargs}
|
{toxinidir}/run-tests.sh {posargs}
|
||||||
{toxinidir}/run-functional-tests.sh "{posargs}"
|
{toxinidir}/run-functional-tests.sh "{posargs}"
|
||||||
aodh-config-generator
|
aodh-config-generator
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue