Convert etcd role config script to a Pythonic CLI

This makes it a class that can be run and is listed in setup.cfg.

It does not change its functionality.

Change-Id: I586ca48a4d4de1756051575a999696a9a5f0f0b2
changes/16/461616/3
Ian Wells 6 years ago
parent 29c817eb70
commit 84cc2a14d2

@ -15,13 +15,14 @@
# under the License.
import click
import jsonutils
import os
import subprocess
import sys
from networking_vpp._i18n import _
from oslo_serialization import jsonutils
ETCDCTL_PATH = "etcdctl"
ENDPOINT = None
@ -217,6 +218,10 @@ def run_checks():
sys.exit(3)
if __name__ == '__main__':
def main():
run_checks()
etcdctl()
if __name__ == '__main__':
main()

@ -37,6 +37,7 @@ console_scripts =
vpp-check-etcd = networking_vpp.tools.test_etcd_content:main
vpp-check-vpp = networking_vpp.tools.test_vpp_content:main
vpp-watch-etcd = networking_vpp.tools.watch_changes:main
vpp-etcd-role-conf = networking_vpp.tools.etcd_role_conf:main
neutron.ml2.mechanism_drivers =
vpp = networking_vpp.mech_vpp:VPPMechanismDriver
neutron.db.alembic_migrations =

Loading…
Cancel
Save