Merge "Fix vmware_nsx tempest plugin"
This commit is contained in:
commit
955094f919
@ -12,6 +12,8 @@
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class L2GatewayConnectionClient(base.BaseNetworkClient):
|
||||
resource = 'l2_gateway_connection'
|
||||
@ -56,7 +58,7 @@ def get_client(client_mgr):
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = L2GatewayConnectionClient(net_client.auth_provider,
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class HealthMonitorsClient(base.BaseNetworkClient):
|
||||
resource = 'healthmonitor'
|
||||
@ -59,7 +61,7 @@ def get_client(client_mgr):
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = HealthMonitorsClient(net_client.auth_provider,
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class L7PoliciesClient(base.BaseNetworkClient):
|
||||
@ -47,7 +48,7 @@ def get_client(client_mgr):
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = L7PoliciesClient(net_client.auth_provider,
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class L7RulesClient(base.BaseNetworkClient):
|
||||
resource = 'rule'
|
||||
@ -47,7 +49,7 @@ def get_client(client_mgr):
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = L7RulesClient(net_client.auth_provider,
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class ListenersClient(base.BaseNetworkClient):
|
||||
resource = 'listener'
|
||||
@ -58,7 +60,7 @@ def get_client(client_mgr):
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = ListenersClient(net_client.auth_provider,
|
||||
|
@ -18,6 +18,7 @@ from tempest.lib import exceptions
|
||||
from tempest.lib.services.network import base
|
||||
|
||||
from vmware_nsx_tempest._i18n import _
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
LB_NOTFOUND = "loadbalancer {lb_id} not found"
|
||||
|
||||
@ -129,7 +130,7 @@ def get_client(client_mgr):
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = LoadBalancersClient(net_client.auth_provider,
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class MembersClient(base.BaseNetworkClient):
|
||||
@ -58,7 +59,7 @@ def get_client(client_mgr):
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = MembersClient(net_client.auth_provider,
|
||||
|
@ -13,6 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class PoolsClient(base.BaseNetworkClient):
|
||||
@ -58,7 +59,7 @@ def get_client(client_mgr):
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = PoolsClient(net_client.auth_provider,
|
||||
|
@ -309,7 +309,7 @@ def get_client(client_mgr):
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = LoadBalancerV1Client(net_client.auth_provider,
|
||||
|
@ -9,9 +9,11 @@
|
||||
# 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 tempest import config
|
||||
from tempest.lib.services.network import base
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
# netowrk/json/base.py does not include thoese method in network_client
|
||||
class BaseNetworkClient(base.BaseNetworkClient):
|
||||
@ -40,3 +42,11 @@ default_params_2 = {
|
||||
'endpoint_type': 'publicURL',
|
||||
'build_timeout': 300,
|
||||
'build_interval': 1}
|
||||
|
||||
default_params_3 = config.service_client_config()
|
||||
|
||||
default_params_with_timeout_values = {
|
||||
'build_interval': CONF.network.build_interval,
|
||||
'build_timeout': CONF.network.build_timeout
|
||||
}
|
||||
default_params_with_timeout_values.update(default_params_3)
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class BandwidthLimitRulesClient(base.BaseNetworkClient):
|
||||
@ -54,7 +55,7 @@ def get_client(client_mgr,
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = BandwidthLimitRulesClient(net_client.auth_provider,
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class DscpMarkingRulesClient(base.BaseNetworkClient):
|
||||
@ -54,7 +55,7 @@ def get_client(client_mgr,
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = DscpMarkingRulesClient(net_client.auth_provider,
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class PoliciesClient(base.BaseNetworkClient):
|
||||
@ -62,7 +63,7 @@ def get_client(client_mgr,
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = PoliciesClient(net_client.auth_provider,
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class RuleTypesClient(base.BaseNetworkClient):
|
||||
@ -36,7 +37,7 @@ def get_client(client_mgr,
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = RuleTypesClient(net_client.auth_provider,
|
||||
|
@ -20,6 +20,7 @@ from tempest.lib.services.network import base
|
||||
|
||||
from vmware_nsx_tempest._i18n import _LI
|
||||
from vmware_nsx_tempest._i18n import _LW
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
@ -95,7 +96,7 @@ def get_client(client_mgr):
|
||||
try:
|
||||
manager = getattr(client_mgr, "manager", client_mgr)
|
||||
net_client = getattr(manager, "networks_client")
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except AttributeError as attribute_err:
|
||||
LOG.warning(_LW("Failed to locate the attribute, Error: %(err_msg)s") %
|
||||
{"err_msg": attribute_err.__str__()})
|
||||
|
@ -17,6 +17,8 @@ from oslo_serialization import jsonutils
|
||||
|
||||
from tempest.lib.services.network import base
|
||||
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
|
||||
class BaseTagsClient(base.BaseNetworkClient):
|
||||
"""Why base client for tags_client:
|
||||
@ -122,7 +124,7 @@ def get_client(client_mgr,
|
||||
manager = getattr(client_mgr, 'manager', client_mgr)
|
||||
net_client = getattr(manager, 'networks_client')
|
||||
try:
|
||||
_params = manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
except Exception:
|
||||
_params = {}
|
||||
client = TagsClient(net_client.auth_provider,
|
||||
|
@ -25,6 +25,7 @@ from tempest import config
|
||||
from tempest import test
|
||||
|
||||
from vmware_nsx_tempest.services import load_balancer_v1_client as LBV1C
|
||||
from vmware_nsx_tempest.services import network_client_base as base_client
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
@ -60,7 +61,7 @@ class LoadBalancerTestJSON(base.BaseNetworkTest):
|
||||
@classmethod
|
||||
def resource_setup(cls):
|
||||
super(LoadBalancerTestJSON, cls).resource_setup()
|
||||
_params = cls.manager.default_params_with_timeout_values.copy()
|
||||
_params = base_client.default_params_with_timeout_values.copy()
|
||||
for p in _params.keys():
|
||||
if p in ['service', 'region', 'endpoint_type']:
|
||||
_params.pop(p)
|
||||
|
Loading…
Reference in New Issue
Block a user