Added basic main shell architecture and initial unit test
This commit is contained in:
11
cratonclient/shell/__init__.py
Normal file
11
cratonclient/shell/__init__.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
18
cratonclient/shell/main.py
Normal file
18
cratonclient/shell/main.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
def main():
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
20
cratonclient/shell/v1.py
Normal file
20
cratonclient/shell/v1.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
#TODO (cmspence): from cratonclient.v1 import regions_shell
|
||||
# from cratonclient.v1 import hosts_shell
|
||||
# from cratonclient.v1 import client_shell
|
||||
|
||||
|
||||
COMMAND_MODULES = [
|
||||
#TODO (cmspence): regions_shell, hosts_shell, client_shell
|
||||
]
|
||||
11
cratonclient/tests/unit/__init__.py
Normal file
11
cratonclient/tests/unit/__init__.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
25
cratonclient/tests/unit/test_main_shell.py
Normal file
25
cratonclient/tests/unit/test_main_shell.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Tests for `cratonclient.shell.main` module."""
|
||||
|
||||
from cratonclient.tests import base
|
||||
from cratonclient.shell import main
|
||||
|
||||
|
||||
class TestShell(base.TestCase):
|
||||
'''Test our craton main shell.'''
|
||||
|
||||
def test_return(self):
|
||||
'''Verify that cratonclient shell main returns as expected.'''
|
||||
print("Craton Shell Help Test")
|
||||
self.assertEqual(main.main(),0)
|
||||
Reference in New Issue
Block a user