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