diff options
author | shiva-charan.m-s <shiva-charan.m-s@hpe.com> | 2016-07-26 22:34:23 -0500 |
---|---|---|
committer | shiva-charan <shiva-charan.m-s@hpe.com> | 2016-08-22 12:32:45 -0500 |
commit | d93490753ba93e4c3aa00cd487855e3d2970ae9a (patch) | |
tree | 9129d35d1df3c36f206d37b657a9100a39a94952 /policy2tosca/build/lib.linux-x86_64-2.7/policy2tosca/main.py | |
parent | 1a9b3ea86e026115938b1872ac1fc3bce30055ed (diff) |
policy2tosca patch set-6
Signed-off-by: shiva-charan <shiva-charan.m-s@hpe.com>
Diffstat (limited to 'policy2tosca/build/lib.linux-x86_64-2.7/policy2tosca/main.py')
-rw-r--r-- | policy2tosca/build/lib.linux-x86_64-2.7/policy2tosca/main.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/policy2tosca/build/lib.linux-x86_64-2.7/policy2tosca/main.py b/policy2tosca/build/lib.linux-x86_64-2.7/policy2tosca/main.py new file mode 100644 index 0000000..39aabfa --- /dev/null +++ b/policy2tosca/build/lib.linux-x86_64-2.7/policy2tosca/main.py @@ -0,0 +1,37 @@ +import logging +import sys + +from cliff.app import App +from cliff.commandmanager import CommandManager + + +class policy2tosca(App): + + log = logging.getLogger(__name__) + + def __init__(self): + super(policy2tosca, self).__init__( + description='Parser Policy2Tosca', + version='0.1', + command_manager=CommandManager('cliff.demo'), + ) + + def initialize_app(self, argv): + self.log.debug('initialize_app') + + def prepare_to_run_command(self, cmd): + self.log.debug('prepare_to_run_command %s', cmd.__class__.__name__) + + def clean_up(self, cmd, result, err): + self.log.debug('clean_up %s', cmd.__class__.__name__) + if err: + self.log.debug('got an error: %s', err) + + +def main(argv=sys.argv[1:]): + myapp = policy2tosca() + return myapp.run(argv) + + +if __name__ == '__main__': + sys.exit(main(sys.argv[1:])) |