vFW and vDNS support added to azure-plugin
[multicloud/azure.git] / azure / aria / aria-extension-cloudify / src / aria / aria / cli / main.py
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements.  See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License.  You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 """
17 Executable entry point into the CLI.
18 """
19
20 from aria import install_aria_extensions
21 from aria.cli import commands
22 from aria.cli.core import aria
23
24
25 @aria.group(name='aria')
26 @aria.options.verbose()
27 @aria.options.version
28 def _aria():
29     """
30     ARIA's Command Line Interface.
31
32     To activate bash-completion run::
33
34         eval "$(_ARIA_COMPLETE=source aria)"
35
36     ARIA's working directory resides by default in "~/.aria". To change it, set the environment
37     variable ARIA_WORKDIR to something else (e.g. "/tmp/").
38     """
39     aria.set_cli_except_hook()
40
41
42 def _register_commands():
43     """
44     Register the CLI's commands.
45     """
46
47     _aria.add_command(commands.service_templates.service_templates)
48     _aria.add_command(commands.node_templates.node_templates)
49     _aria.add_command(commands.services.services)
50     _aria.add_command(commands.nodes.nodes)
51     _aria.add_command(commands.workflows.workflows)
52     _aria.add_command(commands.executions.executions)
53     _aria.add_command(commands.plugins.plugins)
54     _aria.add_command(commands.logs.logs)
55     _aria.add_command(commands.reset.reset)
56
57
58 def main():
59     install_aria_extensions()
60     _register_commands()
61     _aria()
62
63
64 if __name__ == '__main__':
65     main()