Some pep8/pylint fixups.
Change-Id: I01de5ca643c5fcb918d2115b6b9d7dc039238e40
This commit is contained in:
parent
3c4a0b4592
commit
43362b220c
@ -33,6 +33,7 @@ CONFIGS = [API_CONF, REG_CONF, API_PASTE_CONF,
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class GlanceConfigurator(base.Configurator):
|
||||
|
||||
# This db will be dropped and created
|
||||
@ -47,6 +48,7 @@ class GlanceConfigurator(base.Configurator):
|
||||
LOGGING_CONF: self._config_adjust_logging}
|
||||
self.source_configs = {LOGGING_CONF: 'logging.cnf.sample'}
|
||||
self.config_dir = sh.joinpths(self.installer.get_option('app_dir'), 'etc')
|
||||
self.img_dir = "/var/lib/glance/images"
|
||||
|
||||
def _config_adjust_paste(self, config):
|
||||
for (k, v) in self._fetch_keystone_params().items():
|
||||
@ -65,8 +67,16 @@ class GlanceConfigurator(base.Configurator):
|
||||
gparams = ghelper.get_shared_params(**self.installer.options)
|
||||
config.add('bind_port', gparams['endpoints']['public']['port'])
|
||||
|
||||
def clean_image_storage(img_store_dir):
|
||||
LOG.debug(("Ensuring file system store directory %r exists and is "
|
||||
"empty."), img_store_dir)
|
||||
if sh.isdir(img_store_dir):
|
||||
sh.deldir(img_store_dir)
|
||||
sh.mkdirslist(img_store_dir, tracewriter=self.installer.tracewriter)
|
||||
|
||||
config.add('default_store', 'file')
|
||||
config.add('filesystem_store_datadir', "/var/lib/glance/images")
|
||||
config.add('filesystem_store_datadir', self.img_dir)
|
||||
clean_image_storage(self.img_dir)
|
||||
|
||||
def _config_adjust_reg(self, config):
|
||||
self._config_adjust_api_reg(config)
|
||||
@ -83,7 +93,6 @@ class GlanceConfigurator(base.Configurator):
|
||||
'auth_host': params['endpoints']['admin']['host'],
|
||||
'auth_port': params['endpoints']['admin']['port'],
|
||||
'auth_protocol': params['endpoints']['admin']['protocol'],
|
||||
|
||||
'auth_uri': params['endpoints']['public']['uri'],
|
||||
'admin_tenant_name': params['service_tenant'],
|
||||
'admin_user': params['service_user'],
|
||||
|
@ -35,6 +35,7 @@ PKI_FILES = {
|
||||
'certfile': 'ssl/certs/signing_cert.pem',
|
||||
}
|
||||
|
||||
|
||||
class KeystoneConfigurator(base.Configurator):
|
||||
|
||||
# This db will be dropped then created
|
||||
|
@ -80,6 +80,7 @@ CORE_PLUGIN_CLASSES = {
|
||||
"quantum.plugins.linuxbridge.lb_quantum_plugin.LinuxBridgePluginV2",
|
||||
}
|
||||
|
||||
|
||||
class QuantumConfigurator(base.Configurator):
|
||||
|
||||
# This db will be dropped and created
|
||||
|
@ -194,4 +194,3 @@ class NetworkCleaner(object):
|
||||
def clean(self):
|
||||
self._stop_dnsmasq()
|
||||
self._clean_iptables()
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Package formats and package management systems support.
|
||||
|
||||
Supported formats:
|
||||
@ -22,4 +23,4 @@ Supported formats:
|
||||
Supported systems:
|
||||
- pip
|
||||
- YUM
|
||||
"""
|
||||
"""
|
||||
|
@ -31,6 +31,23 @@ from anvil import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
OPENSTACK_PACKAGES = set([
|
||||
"cinder",
|
||||
"glance",
|
||||
"horizon",
|
||||
"keystone",
|
||||
"nova",
|
||||
"oslo.config",
|
||||
"quantum",
|
||||
"swift",
|
||||
"python-cinderclient",
|
||||
"python-glanceclient",
|
||||
"python-keystoneclient",
|
||||
"python-novaclient",
|
||||
"python-quantumclient",
|
||||
"python-swiftclient",
|
||||
])
|
||||
|
||||
|
||||
class InstallHelper(object):
|
||||
"""Run pre and post install for a single package.
|
||||
@ -51,24 +68,6 @@ class InstallHelper(object):
|
||||
utils.execute_template(*cmds, params=params)
|
||||
|
||||
|
||||
OPENSTACK_PACKAGES = set([
|
||||
"cinder",
|
||||
"glance",
|
||||
"horizon",
|
||||
"keystone",
|
||||
"nova",
|
||||
"oslo.config",
|
||||
"quantum",
|
||||
"swift",
|
||||
"python-cinderclient",
|
||||
"python-glanceclient",
|
||||
"python-keystoneclient",
|
||||
"python-novaclient",
|
||||
"python-quantumclient",
|
||||
"python-swiftclient",
|
||||
])
|
||||
|
||||
|
||||
class DependencyHandler(object):
|
||||
"""Basic class for handler of OpenStack dependencies.
|
||||
"""
|
||||
@ -102,7 +101,7 @@ class DependencyHandler(object):
|
||||
@property
|
||||
def python_names(self):
|
||||
if self._python_names is None:
|
||||
self._python_names = self._get_python_names(self.package_dirs)
|
||||
self._python_names = self._get_python_names(self.package_dirs)
|
||||
return self._python_names
|
||||
|
||||
@staticmethod
|
||||
|
@ -241,7 +241,7 @@ class YumDependencyHandler(base.DependencyHandler):
|
||||
continue
|
||||
# See if pip tried to download it but we already can satisfy
|
||||
# it via yum and avoid building it in the first place...
|
||||
(version, repo) = self._find_yum_match(yum_map, req, rpm_name)
|
||||
(_version, repo) = self._find_yum_match(yum_map, req, rpm_name)
|
||||
if not repo:
|
||||
filtered_files.append(filename)
|
||||
else:
|
||||
|
@ -37,7 +37,8 @@ function find_code {
|
||||
function run_pep8 {
|
||||
echo "+ Running pep8 ..."
|
||||
files=$(find_code)
|
||||
ignores="E202,E501,E128,E127,E126,E125,E124,E123,E121"
|
||||
# See: http://pep8.readthedocs.org/en/latest/intro.html#error-codes
|
||||
ignores="E121,E123,E124,E125,E126,E127,E128,E202,E501"
|
||||
output_filename="pep8.log"
|
||||
opts="--ignore=$ignores --repeat"
|
||||
pep8 ${opts} ${files} 2>&1 > $output_filename
|
||||
|
Loading…
Reference in New Issue
Block a user