Add deprecation warning when using map-services

This patch writes a warning out to stderr to notify element authors
that may be using map-services to migrate to svc-map.

Change-Id: Ic80db16c607958d025e89b3a4058a9cbb568938e
This commit is contained in:
Ryan Brady 2014-10-22 11:17:56 -04:00
parent 6fedbc58f9
commit 1aecb41b7e
4 changed files with 12 additions and 2 deletions

View File

@ -5,3 +5,4 @@ set -o pipefail
# For Debian map-services is currently a noop
# We pass through the service name directly
echo "$@"
>&2 echo "WARNING: map-services has been deprecated. Please use svc-map."

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# dib-lint: disable=indent
# Copyright 2012 Hewlett-Packard Development Company, L.P.
# Copyright 2014 SUSE, Inc.
#
@ -15,6 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import os
import sys
@ -50,6 +51,9 @@ service_map = {
'nova-scheduler': 'openstack-nova-scheduler',
}
print("WARNING: map-services has been deprecated. "
"Please use the svc-map element.", file=sys.stderr)
for arg in sys.argv[1:]:
# We need to support the service name being different when installing from
# source vs. packages. So, if the requested service file already exists,

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
# dib-lint: disable=indent
# Copyright 2012 Hewlett-Packard Development Company, L.P.
# Copyright 2014 Red Hat, Inc.
#
@ -15,6 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import os
import sys
@ -67,6 +68,9 @@ service_map = {
'tgt': 'tgtd',
}
print("WARNING: map-services has been deprecated. "
"Please use the svc-map element.", file=sys.stderr)
for arg in sys.argv[1:]:
# We need to support the service name being different when installing from
# source vs. packages. So, if the requested service file already exists,

View File

@ -5,3 +5,4 @@ set -o pipefail
# For Ubuntu map-services is currently a noop
# We pass through the service name directly
echo "$@"
>&2 echo "WARNING: map-services has been deprecated. Please use svc-map."