]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Deprecate --service option for neutron-db-manage
authorHenry Gessau <gessau@cisco.com>
Tue, 1 Sep 2015 21:17:01 +0000 (17:17 -0400)
committerHenry Gessau <gessau@cisco.com>
Wed, 2 Sep 2015 01:32:41 +0000 (21:32 -0400)
Now that https://review.openstack.org/198542 has merged we can
deprecate the --service option. From now on instead of
  --service fwaas
we should instead use
  --subproject neutron-fwaas

This puts the *aas subprojects on equal footing with the other
projects in the Neutron Stadium for neutron-db-manage.

In the Liberty release the --service option will be marked as
deprecated. It will be removed in Mitaka.

Related-Bug: #1470625

Change-Id: Iecc678efafd798b62bb83e6e85333c64760f16b5

neutron/db/migration/cli.py

index 2d8c63780851df23420a4d4b8846a2277be2b7e2..defde0ebda48bb25d09d40356ad1b7dd4dd48fab 100644 (file)
@@ -47,16 +47,7 @@ neutron_alembic_ini = os.path.join(os.path.dirname(__file__), 'alembic.ini')
 VALID_SERVICES = ['fwaas', 'lbaas', 'vpnaas']
 INSTALLED_SERVICES = [service_ for service_ in VALID_SERVICES
                       if 'neutron-%s' % service_ in migration_entrypoints]
-INSTALLED_SERVICE_PROJECTS = ['neutron-%s' % service_
-                              for service_ in INSTALLED_SERVICES]
-INSTALLED_SUBPROJECTS = [project_ for project_ in migration_entrypoints
-                         if project_ not in INSTALLED_SERVICE_PROJECTS]
-
-service_help = (
-    _("Can be one of '%s'.") % "', '".join(INSTALLED_SERVICES)
-    if INSTALLED_SERVICES else
-    _("(No services are currently installed).")
-)
+INSTALLED_SUBPROJECTS = [project_ for project_ in migration_entrypoints]
 
 _core_opts = [
     cfg.StrOpt('core_plugin',
@@ -64,12 +55,14 @@ _core_opts = [
                help=_('Neutron plugin provider module')),
     cfg.StrOpt('service',
                choices=INSTALLED_SERVICES,
-               help=(_("The advanced service to execute the command against. ")
-                     + service_help)),
+               help=(_("(Deprecated. Use '--subproject neutron-SERVICE' "
+                       "instead.) The advanced service to execute the "
+                       "command against."))),
     cfg.StrOpt('subproject',
                choices=INSTALLED_SUBPROJECTS,
                help=(_("The subproject to execute the command against. "
-                       "Can be one of %s.") % INSTALLED_SUBPROJECTS)),
+                       "Can be one of: '%s'.")
+                     % "', '".join(INSTALLED_SUBPROJECTS))),
     cfg.BoolOpt('split_branches',
                 default=False,
                 help=_("Enforce using split branches file structure."))
@@ -478,8 +471,8 @@ def get_alembic_configs():
     # Get the script locations for the specified or installed projects.
     # Which projects to get script locations for is determined by the CLI
     # options as follows:
-    #     --service X       # only subproject neutron-X
-    #     --subproject Y    # only subproject Y
+    #     --service X       # only subproject neutron-X (deprecated)
+    #     --subproject Y    # only subproject Y (where Y can be neutron)
     #     (none specified)  # neutron and all installed subprojects
     script_locations = {}
     if CONF.service: