Pep8/Pyflakes fixing

Just avoiding the error popups in the editor that way.

Change-Id: Ic0cb903dfb0e9eff6b12d004da720919f6f1a009
This commit is contained in:
Dirk Mueller 2014-02-17 22:37:34 +01:00
parent 621376db44
commit 0ab2a1300f
6 changed files with 59 additions and 60 deletions

View File

@ -14,7 +14,6 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import os
import sys import sys
from diskimage_builder.element_dependencies import main from diskimage_builder.element_dependencies import main

View File

@ -47,11 +47,11 @@ package_map = {
'qpidd': 'qpid-cpp-server', 'qpidd': 'qpid-cpp-server',
'qpid-client': 'qpid-cpp-client', 'qpid-client': 'qpid-cpp-client',
'extlinux': 'syslinux-extlinux', 'extlinux': 'syslinux-extlinux',
'mysql-client-5.5' : 'mariadb', 'mysql-client-5.5': 'mariadb',
'mysql-server-5.5' : 'mariadb-server', 'mysql-server-5.5': 'mariadb-server',
'libmysql-java' : 'mysql-connector-java', 'libmysql-java': 'mysql-connector-java',
'default-jre' : 'java', 'default-jre': 'java',
'tftpd-hpa' : 'tftp-server', 'tftpd-hpa': 'tftp-server',
'apache2': 'httpd', 'apache2': 'httpd',
'libapache2-mod-wsgi': 'mod_wsgi', 'libapache2-mod-wsgi': 'mod_wsgi',
'gearman-job-server': 'gearmand', 'gearman-job-server': 'gearmand',
@ -62,7 +62,7 @@ package_map = {
'nagios-plugins-basic': 'nagios-plugins-all', 'nagios-plugins-basic': 'nagios-plugins-all',
# openstack mappings # openstack mappings
'openstack-neutron-dhcp-agent': 'openstack-neutron', 'openstack-neutron-dhcp-agent': 'openstack-neutron',
} }
for arg in sys.argv[1:]: for arg in sys.argv[1:]:
if arg not in package_map and arg.endswith('-dev'): if arg not in package_map and arg.endswith('-dev'):

View File

@ -23,29 +23,29 @@ import sys
# distromatch or other rich data sources. # distromatch or other rich data sources.
# TripleO service name on the left, Fedora on the right. # TripleO service name on the left, Fedora on the right.
service_map = { service_map = {
'glance-api': 'openstack-glance-api', 'glance-api': 'openstack-glance-api',
'glance-reg': 'openstack-glance-registry', 'glance-reg': 'openstack-glance-registry',
'heat-api': 'openstack-heat-api', 'heat-api': 'openstack-heat-api',
'heat-api-cfn': 'openstack-heat-api-cfn', 'heat-api-cfn': 'openstack-heat-api-cfn',
'heat-api-cloudwatch': 'openstack-heat-api-cloudwatch', 'heat-api-cloudwatch': 'openstack-heat-api-cloudwatch',
'heat-engine': 'openstack-heat-engine', 'heat-engine': 'openstack-heat-engine',
'keystone': 'openstack-keystone', 'keystone': 'openstack-keystone',
'mysql': 'mysqld', 'mysql': 'mysqld',
'nova-conductor': 'openstack-nova-conductor', 'nova-conductor': 'openstack-nova-conductor',
'nova-api': 'openstack-nova-api', 'nova-api': 'openstack-nova-api',
'nova-cert': 'openstack-nova-cert', 'nova-cert': 'openstack-nova-cert',
'nova-scheduler': 'openstack-nova-scheduler', 'nova-scheduler': 'openstack-nova-scheduler',
'nova-consoleauth': 'openstack-nova-consoleauth', 'nova-consoleauth': 'openstack-nova-consoleauth',
'nova-compute': 'openstack-nova-compute', 'nova-compute': 'openstack-nova-compute',
'swift-proxy': 'openstack-swift-proxy', 'swift-proxy': 'openstack-swift-proxy',
'swift-account': 'openstack-swift-account', 'swift-account': 'openstack-swift-account',
'swift-container': 'openstack-swift-container', 'swift-container': 'openstack-swift-container',
'swift-object': 'openstack-swift-object', 'swift-object': 'openstack-swift-object',
'cinder-api': 'openstack-cinder-api', 'cinder-api': 'openstack-cinder-api',
'cinder-scheduler': 'openstack-cinder-scheduler', 'cinder-scheduler': 'openstack-cinder-scheduler',
'cinder-volume': 'openstack-cinder-volume', 'cinder-volume': 'openstack-cinder-volume',
'tgt': 'tgtd', 'tgt': 'tgtd',
} }
for arg in sys.argv[1:]: for arg in sys.argv[1:]:
# We need to support the service name being different when installing from # We need to support the service name being different when installing from

View File

@ -53,7 +53,7 @@ package_map = {
'openstack-heat-common': 'openstack-heat', 'openstack-heat-common': 'openstack-heat',
'openstack-neutron-openvswitch': 'openstack-neutron-openvswitch-agent', 'openstack-neutron-openvswitch': 'openstack-neutron-openvswitch-agent',
'openstack-neutron-ml2': 'openstack-neutron', 'openstack-neutron-ml2': 'openstack-neutron',
} }
for arg in sys.argv[1:]: for arg in sys.argv[1:]:
print(package_map.get(arg, arg)) print(package_map.get(arg, arg))

View File

@ -23,39 +23,39 @@ import sys
# distromatch or other rich data sources. # distromatch or other rich data sources.
# Debian name on the left, openSUSE on the right. # Debian name on the left, openSUSE on the right.
service_map = { service_map = {
# openstack mapping # openstack mapping
'cinder-api': 'openstack-cinder-api', 'cinder-api': 'openstack-cinder-api',
'cinder-scheduler': 'openstack-cinder-scheduler', 'cinder-scheduler': 'openstack-cinder-scheduler',
'cinder-volume': 'openstack-cinder-volume', 'cinder-volume': 'openstack-cinder-volume',
'glance-api': 'openstack-glance-api', 'glance-api': 'openstack-glance-api',
'glance-reg': 'openstack-glance-registry', 'glance-reg': 'openstack-glance-registry',
'heat-api-cfn': 'openstack-heat-api-cfn', 'heat-api-cfn': 'openstack-heat-api-cfn',
'heat-api-cloudwatch': 'openstack-heat-api-cloudwatch', 'heat-api-cloudwatch': 'openstack-heat-api-cloudwatch',
'heat-api': 'openstack-heat-api', 'heat-api': 'openstack-heat-api',
'heat-engine': 'openstack-heat-engine', 'heat-engine': 'openstack-heat-engine',
'keystone': 'openstack-keystone', 'keystone': 'openstack-keystone',
'neutron-dhcp-agent': 'openstack-neutron-dhcp-agent', 'neutron-dhcp-agent': 'openstack-neutron-dhcp-agent',
'neutron-openvswitch-agent': 'openstack-neutron-openvswitch-agent', 'neutron-openvswitch-agent': 'openstack-neutron-openvswitch-agent',
'neutron-l3-agent': 'openstack-neutron-l3-agent', 'neutron-l3-agent': 'openstack-neutron-l3-agent',
'neutron-metadata-agent': 'openstack-neutron-metadata-agent', 'neutron-metadata-agent': 'openstack-neutron-metadata-agent',
'neutron-ovs-cleanup': 'openstack-neutron-ovs-cleanup', 'neutron-ovs-cleanup': 'openstack-neutron-ovs-cleanup',
'neutron-server': 'openstack-neutron', 'neutron-server': 'openstack-neutron',
'nova-api': 'openstack-nova-api', 'nova-api': 'openstack-nova-api',
'nova-cert': 'openstack-nova-cert', 'nova-cert': 'openstack-nova-cert',
'nova-compute': 'openstack-nova-compute', 'nova-compute': 'openstack-nova-compute',
'nova-conductor': 'openstack-nova-conductor', 'nova-conductor': 'openstack-nova-conductor',
'nova-consoleauth': 'openstack-nova-console', 'nova-consoleauth': 'openstack-nova-console',
'nova-baremetal-deploy-helper': 'openstack-nova-baremetal-deploy-helper', 'nova-baremetal-deploy-helper': 'openstack-nova-baremetal-deploy-helper',
'nova-novncproxy': 'openstack-nova-novncproxy', 'nova-novncproxy': 'openstack-nova-novncproxy',
'nova-scheduler': 'openstack-nova-scheduler', 'nova-scheduler': 'openstack-nova-scheduler',
} }
for arg in sys.argv[1:]: for arg in sys.argv[1:]:
# We need to support the service name being different when installing from # We need to support the service name being different when installing from
# source vs. packages. So, if the requested service file already exists, # source vs. packages. So, if the requested service file already exists,
# just use that. # just use that.
if os.path.exists('/usr/lib/systemd/system/%s.service' % arg): if os.path.exists('/usr/lib/systemd/system/%s.service' % arg):
print arg print(arg)
else: else:
print(service_map.get(arg, arg)) print(service_map.get(arg, arg))
sys.exit(0) sys.exit(0)

View File

@ -26,12 +26,12 @@ package_map = {
'augeas-tools': 'augeas', 'augeas-tools': 'augeas',
'openssh-client': 'openssh-clients', 'openssh-client': 'openssh-clients',
'default-jre': 'java-1.7.0-openjdk', 'default-jre': 'java-1.7.0-openjdk',
'tftpd-hpa' : 'tftp-server', 'tftpd-hpa': 'tftp-server',
'libffi-dev': 'libffi-devel', 'libffi-dev': 'libffi-devel',
'gearman-job-server': 'gearmand', 'gearman-job-server': 'gearmand',
'tgt': 'scsi-target-utils', 'tgt': 'scsi-target-utils',
'stunnel4': 'stunnel', 'stunnel4': 'stunnel',
} }
for arg in sys.argv[1:]: for arg in sys.argv[1:]:
print(package_map.get(arg, arg)) print(package_map.get(arg, arg))