# Path: tackerclient/common/exceptions.py
# class TackerException(Exception):
# class TackerClientException(TackerException):
# class BadRequest(TackerClientException):
# class Unauthorized(TackerClientException):
# class Forbidden(TackerClientException):
# class NotFound(TackerClientException):
# class Conflict(TackerClientException):
# class InternalServerError(TackerClientException):
# class ServiceUnavailable(TackerClientException):
# class NetworkNotFoundClient(NotFound):
# class PortNotFoundClient(NotFound):
# class StateInvalidClient(BadRequest):
# class NetworkInUseClient(Conflict):
# class PortInUseClient(Conflict):
# class IpAddressInUseClient(Conflict):
# class InvalidIpForNetworkClient(BadRequest):
# class OverQuotaClient(Conflict):
# class IpAddressGenerationFailureClient(Conflict):
# class MacAddressInUseClient(Conflict):
# class ExternalIpAddressExhaustedClient(BadRequest):
# class NoAuthURLProvided(Unauthorized):
# class EndpointNotFound(TackerClientException):
# class EndpointTypeNotFound(TackerClientException):
# class AmbiguousEndpoints(TackerClientException):
# class RequestURITooLong(TackerClientException):
# class ConnectionFailed(TackerClientException):
# class SslCertificateValidationError(TackerClientException):
# class MalformedResponseBody(TackerClientException):
# class InvalidContentType(TackerClientException):
# class InvalidInput(TackerClientException):
# class UnsupportedCommandVersion(TackerClientException):
# class TackerCLIError(TackerException):
# class CommandError(TackerCLIError):
# class UnsupportedVersion(TackerCLIError):
# class TackerClientNoUniqueMatch(TackerCLIError):
#     def __init__(self, message=None, **kwargs):
#     def __str__(self):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, **kwargs):
# HTTP_EXCEPTION_MAP = {
#     400: BadRequest,
#     401: Unauthorized,
#     403: Forbidden,
#     404: NotFound,
#     409: Conflict,
#     500: InternalServerError,
#     503: ServiceUnavailable,
# }
# 
# Path: tackerclient/osc/common/vnflcm/vnflcm_versions.py
# SUPPORTED_VERSIONS = [1, 2]
# class VnfLcmVersions(command.ShowOne):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: tackerclient/tests/unit/osc/base.py
# class FixturedTestCase(testtools.TestCase):
# class ParserException(Exception):
#     def setUp(self):
#     def check_parser(self, cmd, args, verify_args):
#     def assertNotCalled(self, m, msg=None):
#     def assertListItemsEqual(self, expected, actual):
# 
# Path: tackerclient/tests/unit/osc/v1/fixture_data/client.py
# IDENTITY_URL = 'http://identityserver:5000/v3'
# TACKER_URL = 'http://nfv-orchestration'
# class ClientFixture(fixtures.Fixture):
#     def __init__(self, requests_mock, identity_url=IDENTITY_URL,
#                  api_version='1'):
#     def setUp(self):
#     def new_client(self):


import os
import ddt
from unittest import mock
from tackerclient.common import exceptions
from tackerclient.osc.common.vnflcm import vnflcm_versions
from tackerclient.tests.unit.osc import base
from tackerclient.tests.unit.osc.v1.fixture_data import client
        self.app.client_manager.tackerclient = self.client_manager


@ddt.ddt
class TestVnfLcmVersions(TestVnfLcm):

    def setUp(self):
        super(TestVnfLcmVersions, self).setUp()
        self.vnflcm_versions = vnflcm_versions.VnfLcmVersions(
            self.app, self.app_args, cmd_name='vnflcm versions')

    def _versions_response(self, major_version=None):
        if major_version is None:
            return {"uriPrefix": "/vnflcm",
                    "apiVersions": [{"version": "1.3.0",
                                     "isDeprecated": False},
                                    {"version": "2.0.0",
                                     "isDeprecated": False}]}
        elif major_version == "1":
            return {"uriPrefix": "/vnflcm/v1",
                    "apiVersions": [{"version": "1.3.0",
                                     "isDeprecated": False}]}
        elif major_version == "2":
            return {"uriPrefix": "/vnflcm/v2",
                    "apiVersions": [{"version": "2.0.0",
                                     "isDeprecated": False}]}

    def test_invalid_major_version(self):
        parser = self.vnflcm_versions.get_parser('vnflcm versions')
        parsed_args = parser.parse_args(["--major-version", "3"])

# Path: tackerclient/common/exceptions.py
# class TackerException(Exception):
# class TackerClientException(TackerException):
# class BadRequest(TackerClientException):
# class Unauthorized(TackerClientException):
# class Forbidden(TackerClientException):
# class NotFound(TackerClientException):
# class Conflict(TackerClientException):
# class InternalServerError(TackerClientException):
# class ServiceUnavailable(TackerClientException):
# class NetworkNotFoundClient(NotFound):
# class PortNotFoundClient(NotFound):
# class StateInvalidClient(BadRequest):
# class NetworkInUseClient(Conflict):
# class PortInUseClient(Conflict):
# class IpAddressInUseClient(Conflict):
# class InvalidIpForNetworkClient(BadRequest):
# class OverQuotaClient(Conflict):
# class IpAddressGenerationFailureClient(Conflict):
# class MacAddressInUseClient(Conflict):
# class ExternalIpAddressExhaustedClient(BadRequest):
# class NoAuthURLProvided(Unauthorized):
# class EndpointNotFound(TackerClientException):
# class EndpointTypeNotFound(TackerClientException):
# class AmbiguousEndpoints(TackerClientException):
# class RequestURITooLong(TackerClientException):
# class ConnectionFailed(TackerClientException):
# class SslCertificateValidationError(TackerClientException):
# class MalformedResponseBody(TackerClientException):
# class InvalidContentType(TackerClientException):
# class InvalidInput(TackerClientException):
# class UnsupportedCommandVersion(TackerClientException):
# class TackerCLIError(TackerException):
# class CommandError(TackerCLIError):
# class UnsupportedVersion(TackerCLIError):
# class TackerClientNoUniqueMatch(TackerCLIError):
#     def __init__(self, message=None, **kwargs):
#     def __str__(self):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, **kwargs):
# HTTP_EXCEPTION_MAP = {
#     400: BadRequest,
#     401: Unauthorized,
#     403: Forbidden,
#     404: NotFound,
#     409: Conflict,
#     500: InternalServerError,
#     503: ServiceUnavailable,
# }
# 
# Path: tackerclient/osc/common/vnflcm/vnflcm_versions.py
# SUPPORTED_VERSIONS = [1, 2]
# class VnfLcmVersions(command.ShowOne):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: tackerclient/tests/unit/osc/base.py
# class FixturedTestCase(testtools.TestCase):
# class ParserException(Exception):
#     def setUp(self):
#     def check_parser(self, cmd, args, verify_args):
#     def assertNotCalled(self, m, msg=None):
#     def assertListItemsEqual(self, expected, actual):
# 
# Path: tackerclient/tests/unit/osc/v1/fixture_data/client.py
# IDENTITY_URL = 'http://identityserver:5000/v3'
# TACKER_URL = 'http://nfv-orchestration'
# class ClientFixture(fixtures.Fixture):
#     def __init__(self, requests_mock, identity_url=IDENTITY_URL,
#                  api_version='1'):
#     def setUp(self):
#     def new_client(self):


# Path: tackerclient/tests/unit/osc/common/test_vnflcm_versions.py
import os
import ddt
from unittest import mock
from tackerclient.common import exceptions
from tackerclient.osc.common.vnflcm import vnflcm_versions
from tackerclient.tests.unit.osc import base
from tackerclient.tests.unit.osc.v1.fixture_data import client

        self.app.client_manager.tackerclient = self.client_manager


@ddt.ddt
class TestVnfLcmVersions(TestVnfLcm):

    def setUp(self):
        super(TestVnfLcmVersions, self).setUp()
        self.vnflcm_versions = vnflcm_versions.VnfLcmVersions(
            self.app, self.app_args, cmd_name='vnflcm versions')

    def _versions_response(self, major_version=None):
        if major_version is None:
            return {"uriPrefix": "/vnflcm",
                    "apiVersions": [{"version": "1.3.0",
                                     "isDeprecated": False},
                                    {"version": "2.0.0",
                                     "isDeprecated": False}]}
        elif major_version == "1":
            return {"uriPrefix": "/vnflcm/v1",
                    "apiVersions": [{"version": "1.3.0",
                                     "isDeprecated": False}]}
        elif major_version == "2":
            return {"uriPrefix": "/vnflcm/v2",
                    "apiVersions": [{"version": "2.0.0",
                                     "isDeprecated": False}]}

    def test_invalid_major_version(self):
        parser = self.vnflcm_versions.get_parser('vnflcm versions')
        parsed_args = parser.parse_args(["--major-version", "3"])

        self.assertRaises(exceptions.InvalidInput,