Skip to content

Commit 0841a6c

Browse files
authored
Reegister service and add empty proxy for CCN (#664)
Reegister service and add empty proxy for CCN Reviewed-by: Anton Sidelnikov Reviewed-by: Shushanik Hovhannesyan <shhovhan@gmail.com>
1 parent 2b6a89d commit 0841a6c

8 files changed

Lines changed: 65 additions & 0 deletions

File tree

otcextensions/sdk/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
"service_type": "cce",
7171
"endpoint_service_type": "ccev2.0",
7272
},
73+
"ccn": {
74+
"service_type": "ccn",
75+
"append_project_id": True,
76+
"endpoint_service_type": "cc",
77+
},
7378
"ces": {
7479
"service_type": "ces",
7580
"append_project_id": True,

otcextensions/sdk/ccn/__init__.py

Whitespace-only changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
13+
from openstack import service_description
14+
from otcextensions.sdk.ccn.v3 import _proxy
15+
16+
17+
class CcnService(service_description.ServiceDescription):
18+
"""The Cloud Connect service."""
19+
20+
supported_versions = {"3": _proxy.Proxy}

otcextensions/sdk/ccn/v3/__init__.py

Whitespace-only changes.

otcextensions/sdk/ccn/v3/_proxy.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
from openstack import proxy
13+
14+
15+
class Proxy(proxy.Proxy):
16+
17+
skip_discovery = True

otcextensions/tests/functional/sdk/ccn/__init__.py

Whitespace-only changes.

otcextensions/tests/functional/sdk/ccn/v1/__init__.py

Whitespace-only changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
from openstack import _log
13+
from otcextensions.tests.functional import base
14+
15+
_logger = _log.setup_logging("openstack")
16+
17+
18+
class TestService(base.BaseFunctionalTest):
19+
20+
def test_initialize(self):
21+
client = self.conn.ccn
22+
23+
self.assertIsNotNone(client)

0 commit comments

Comments
 (0)