From 0ab2a1300f2c345c6cdd5afe260d033c43053de2 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 17 Feb 2014 22:37:34 +0100 Subject: [PATCH] Pep8/Pyflakes fixing Just avoiding the error popups in the editor that way. Change-Id: Ic0cb903dfb0e9eff6b12d004da720919f6f1a009 --- bin/element-info | 1 - elements/fedora/bin/map-packages | 12 +++---- elements/fedora/bin/map-services | 46 ++++++++++++------------- elements/opensuse/bin/map-packages | 2 +- elements/opensuse/bin/map-services | 54 +++++++++++++++--------------- elements/rhel/bin/map-packages | 4 +-- 6 files changed, 59 insertions(+), 60 deletions(-) diff --git a/bin/element-info b/bin/element-info index 1bdf3c010..99a1f110c 100755 --- a/bin/element-info +++ b/bin/element-info @@ -14,7 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -import os import sys from diskimage_builder.element_dependencies import main diff --git a/elements/fedora/bin/map-packages b/elements/fedora/bin/map-packages index c8d057273..cb1919853 100755 --- a/elements/fedora/bin/map-packages +++ b/elements/fedora/bin/map-packages @@ -47,11 +47,11 @@ package_map = { 'qpidd': 'qpid-cpp-server', 'qpid-client': 'qpid-cpp-client', 'extlinux': 'syslinux-extlinux', - 'mysql-client-5.5' : 'mariadb', - 'mysql-server-5.5' : 'mariadb-server', - 'libmysql-java' : 'mysql-connector-java', - 'default-jre' : 'java', - 'tftpd-hpa' : 'tftp-server', + 'mysql-client-5.5': 'mariadb', + 'mysql-server-5.5': 'mariadb-server', + 'libmysql-java': 'mysql-connector-java', + 'default-jre': 'java', + 'tftpd-hpa': 'tftp-server', 'apache2': 'httpd', 'libapache2-mod-wsgi': 'mod_wsgi', 'gearman-job-server': 'gearmand', @@ -62,7 +62,7 @@ package_map = { 'nagios-plugins-basic': 'nagios-plugins-all', # openstack mappings 'openstack-neutron-dhcp-agent': 'openstack-neutron', - } +} for arg in sys.argv[1:]: if arg not in package_map and arg.endswith('-dev'): diff --git a/elements/fedora/bin/map-services b/elements/fedora/bin/map-services index 3f116b348..6f04bb410 100755 --- a/elements/fedora/bin/map-services +++ b/elements/fedora/bin/map-services @@ -23,29 +23,29 @@ import sys # distromatch or other rich data sources. # TripleO service name on the left, Fedora on the right. service_map = { - 'glance-api': 'openstack-glance-api', - 'glance-reg': 'openstack-glance-registry', - 'heat-api': 'openstack-heat-api', - 'heat-api-cfn': 'openstack-heat-api-cfn', - 'heat-api-cloudwatch': 'openstack-heat-api-cloudwatch', - 'heat-engine': 'openstack-heat-engine', - 'keystone': 'openstack-keystone', - 'mysql': 'mysqld', - 'nova-conductor': 'openstack-nova-conductor', - 'nova-api': 'openstack-nova-api', - 'nova-cert': 'openstack-nova-cert', - 'nova-scheduler': 'openstack-nova-scheduler', - 'nova-consoleauth': 'openstack-nova-consoleauth', - 'nova-compute': 'openstack-nova-compute', - 'swift-proxy': 'openstack-swift-proxy', - 'swift-account': 'openstack-swift-account', - 'swift-container': 'openstack-swift-container', - 'swift-object': 'openstack-swift-object', - 'cinder-api': 'openstack-cinder-api', - 'cinder-scheduler': 'openstack-cinder-scheduler', - 'cinder-volume': 'openstack-cinder-volume', - 'tgt': 'tgtd', - } + 'glance-api': 'openstack-glance-api', + 'glance-reg': 'openstack-glance-registry', + 'heat-api': 'openstack-heat-api', + 'heat-api-cfn': 'openstack-heat-api-cfn', + 'heat-api-cloudwatch': 'openstack-heat-api-cloudwatch', + 'heat-engine': 'openstack-heat-engine', + 'keystone': 'openstack-keystone', + 'mysql': 'mysqld', + 'nova-conductor': 'openstack-nova-conductor', + 'nova-api': 'openstack-nova-api', + 'nova-cert': 'openstack-nova-cert', + 'nova-scheduler': 'openstack-nova-scheduler', + 'nova-consoleauth': 'openstack-nova-consoleauth', + 'nova-compute': 'openstack-nova-compute', + 'swift-proxy': 'openstack-swift-proxy', + 'swift-account': 'openstack-swift-account', + 'swift-container': 'openstack-swift-container', + 'swift-object': 'openstack-swift-object', + 'cinder-api': 'openstack-cinder-api', + 'cinder-scheduler': 'openstack-cinder-scheduler', + 'cinder-volume': 'openstack-cinder-volume', + 'tgt': 'tgtd', +} for arg in sys.argv[1:]: # We need to support the service name being different when installing from diff --git a/elements/opensuse/bin/map-packages b/elements/opensuse/bin/map-packages index 93d77ce0f..b21b03cc5 100755 --- a/elements/opensuse/bin/map-packages +++ b/elements/opensuse/bin/map-packages @@ -53,7 +53,7 @@ package_map = { 'openstack-heat-common': 'openstack-heat', 'openstack-neutron-openvswitch': 'openstack-neutron-openvswitch-agent', 'openstack-neutron-ml2': 'openstack-neutron', - } +} for arg in sys.argv[1:]: print(package_map.get(arg, arg)) diff --git a/elements/opensuse/bin/map-services b/elements/opensuse/bin/map-services index a8fa94763..7bc0db0bf 100755 --- a/elements/opensuse/bin/map-services +++ b/elements/opensuse/bin/map-services @@ -23,39 +23,39 @@ import sys # distromatch or other rich data sources. # Debian name on the left, openSUSE on the right. service_map = { - # openstack mapping - 'cinder-api': 'openstack-cinder-api', - 'cinder-scheduler': 'openstack-cinder-scheduler', - 'cinder-volume': 'openstack-cinder-volume', - 'glance-api': 'openstack-glance-api', - 'glance-reg': 'openstack-glance-registry', - 'heat-api-cfn': 'openstack-heat-api-cfn', - 'heat-api-cloudwatch': 'openstack-heat-api-cloudwatch', - 'heat-api': 'openstack-heat-api', - 'heat-engine': 'openstack-heat-engine', - 'keystone': 'openstack-keystone', - 'neutron-dhcp-agent': 'openstack-neutron-dhcp-agent', - 'neutron-openvswitch-agent': 'openstack-neutron-openvswitch-agent', - 'neutron-l3-agent': 'openstack-neutron-l3-agent', - 'neutron-metadata-agent': 'openstack-neutron-metadata-agent', - 'neutron-ovs-cleanup': 'openstack-neutron-ovs-cleanup', - 'neutron-server': 'openstack-neutron', - 'nova-api': 'openstack-nova-api', - 'nova-cert': 'openstack-nova-cert', - 'nova-compute': 'openstack-nova-compute', - 'nova-conductor': 'openstack-nova-conductor', - 'nova-consoleauth': 'openstack-nova-console', - 'nova-baremetal-deploy-helper': 'openstack-nova-baremetal-deploy-helper', - 'nova-novncproxy': 'openstack-nova-novncproxy', - 'nova-scheduler': 'openstack-nova-scheduler', - } + # openstack mapping + 'cinder-api': 'openstack-cinder-api', + 'cinder-scheduler': 'openstack-cinder-scheduler', + 'cinder-volume': 'openstack-cinder-volume', + 'glance-api': 'openstack-glance-api', + 'glance-reg': 'openstack-glance-registry', + 'heat-api-cfn': 'openstack-heat-api-cfn', + 'heat-api-cloudwatch': 'openstack-heat-api-cloudwatch', + 'heat-api': 'openstack-heat-api', + 'heat-engine': 'openstack-heat-engine', + 'keystone': 'openstack-keystone', + 'neutron-dhcp-agent': 'openstack-neutron-dhcp-agent', + 'neutron-openvswitch-agent': 'openstack-neutron-openvswitch-agent', + 'neutron-l3-agent': 'openstack-neutron-l3-agent', + 'neutron-metadata-agent': 'openstack-neutron-metadata-agent', + 'neutron-ovs-cleanup': 'openstack-neutron-ovs-cleanup', + 'neutron-server': 'openstack-neutron', + 'nova-api': 'openstack-nova-api', + 'nova-cert': 'openstack-nova-cert', + 'nova-compute': 'openstack-nova-compute', + 'nova-conductor': 'openstack-nova-conductor', + 'nova-consoleauth': 'openstack-nova-console', + 'nova-baremetal-deploy-helper': 'openstack-nova-baremetal-deploy-helper', + 'nova-novncproxy': 'openstack-nova-novncproxy', + 'nova-scheduler': 'openstack-nova-scheduler', +} 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, # just use that. if os.path.exists('/usr/lib/systemd/system/%s.service' % arg): - print arg + print(arg) else: print(service_map.get(arg, arg)) sys.exit(0) diff --git a/elements/rhel/bin/map-packages b/elements/rhel/bin/map-packages index 149a0ab97..becd1d28c 100755 --- a/elements/rhel/bin/map-packages +++ b/elements/rhel/bin/map-packages @@ -26,12 +26,12 @@ package_map = { 'augeas-tools': 'augeas', 'openssh-client': 'openssh-clients', 'default-jre': 'java-1.7.0-openjdk', - 'tftpd-hpa' : 'tftp-server', + 'tftpd-hpa': 'tftp-server', 'libffi-dev': 'libffi-devel', 'gearman-job-server': 'gearmand', 'tgt': 'scsi-target-utils', 'stunnel4': 'stunnel', - } +} for arg in sys.argv[1:]: print(package_map.get(arg, arg))