Stubbed out the rest of the commands in the spec. This list may change between now and the final product. Added information to the README.rst to help with setup / build of the kollaclient command.
This commit is contained in:
parent
86b7524678
commit
6e8a302748
19
README.rst
19
README.rst
|
@ -1 +1,18 @@
|
|||
TODO(bmace) put stuff in here
|
||||
===========
|
||||
KollaClient
|
||||
===========
|
||||
|
||||
The following steps can be used to build / run the kollaclient:
|
||||
|
||||
* virtualenv .venv
|
||||
* . .venv/bin/activate
|
||||
* pip install -r requirements.txt
|
||||
* python setup.py install
|
||||
* kollaclient
|
||||
|
||||
At that point you will be dropped into the kollaclient shell where
|
||||
you can run commands like help or ? to see what commands are
|
||||
available and any of the sub commands can be executed directly.
|
||||
|
||||
Alternately you can not use the shell and just execute commands
|
||||
directly via >kollaclient host add, etc.
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
import logging
|
||||
|
||||
from kollaclient.i18n import _
|
||||
|
||||
from cliff.command import Command
|
||||
|
||||
|
||||
class Deploy(Command):
|
||||
"Deploy"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("deploy"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class List(Command):
|
||||
"List"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("list"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class Start(Command):
|
||||
"Start"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("start"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class Stop(Command):
|
||||
"Stop"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("stop"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class Sync(Command):
|
||||
"Sync"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("sync"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class Upgrade(Command):
|
||||
"Upgrade"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("upgrade"))
|
||||
self.app.stdout.write(parsed_args)
|
|
@ -33,3 +33,33 @@ class HostList(Command):
|
|||
def take_action(self, parsed_args):
|
||||
self.log.info(_("host list"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class HostSetzone(Command):
|
||||
"Host Setzone"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("host setzone"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class HostAddservice(Command):
|
||||
"Host Addservice"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("host addservice"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class HostRemoveservice(Command):
|
||||
"Host Removeservice"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("host removeservice"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
import logging
|
||||
|
||||
from kollaclient.i18n import _
|
||||
|
||||
from cliff.command import Command
|
||||
|
||||
|
||||
class PropertySet(Command):
|
||||
"Property Set"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("property set"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class PropertyList(Command):
|
||||
"Property List"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("property list"))
|
||||
self.app.stdout.write(parsed_args)
|
|
@ -0,0 +1,45 @@
|
|||
import logging
|
||||
|
||||
from kollaclient.i18n import _
|
||||
|
||||
from cliff.command import Command
|
||||
|
||||
|
||||
class ServiceActivate(Command):
|
||||
"Service Activate"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("service activate"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class ServiceDeactivate(Command):
|
||||
"Service Deactivate"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("service deactivate"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class ServiceAutodeploy(Command):
|
||||
"Service Autodeploy"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("service autodeploy"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class ServiceList(Command):
|
||||
"Service List"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("service list"))
|
||||
self.app.stdout.write(parsed_args)
|
|
@ -0,0 +1,35 @@
|
|||
import logging
|
||||
|
||||
from kollaclient.i18n import _
|
||||
|
||||
from cliff.command import Command
|
||||
|
||||
|
||||
class ZoneAdd(Command):
|
||||
"Zone Add"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("zone add"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class ZoneRemove(Command):
|
||||
"Zone Remove"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("zone remove"))
|
||||
self.app.stdout.write(parsed_args)
|
||||
|
||||
|
||||
class ZoneList(Command):
|
||||
"Zone List"
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.info(_("zone list"))
|
||||
self.app.stdout.write(parsed_args)
|
18
setup.cfg
18
setup.cfg
|
@ -34,6 +34,24 @@ kolla.client =
|
|||
host_add = kollaclient.host:HostAdd
|
||||
host_remove = kollaclient.host:HostRemove
|
||||
host_list = kollaclient.host:HostList
|
||||
host_setzone = kollaclient.host:HostSetzone
|
||||
host_addservice = kollaclient.host:HostAddservice
|
||||
host_removeservice = kollaclient.host:HostRemoveservice
|
||||
service_activate = kollaclient.service:ServiceEnable
|
||||
service_deactivate = kollaclient.service:ServiceDisable
|
||||
service_autodeploy = kollaclient.service:ServiceAutodeploy
|
||||
service_list = kollaclient.service:ServiceList
|
||||
zone_add = kollaclient.zone:ZoneAdd
|
||||
zone_remove = kollaclient.zone:ZoneRemove
|
||||
zone_list = kollaclient.zone:ZoneList
|
||||
property_set = kollaclient.property:PropertySet
|
||||
property_list = kollaclient.property:PropertyList
|
||||
deploy = kollaclient.common:Deploy
|
||||
list = kollaclient.common:List
|
||||
start = kollaclient.common:Start
|
||||
stop = kollaclient.common:Stop
|
||||
sync = kollaclient.common:Sync
|
||||
upgrade = kollaclient.common:Upgrade
|
||||
|
||||
[extract_messages]
|
||||
keywords = _ gettext ngettext l_ lazy_gettext
|
||||
|
|
Loading…
Reference in New Issue