Minor cleanups

* Make bin/* scripts pep8 compliant
* Cleanup tox.ini
* Update references of old repo
* Add swiftonfile-migrate-metadata to spec file

Change-Id: Icfa29cffcedfc357ab860a9023b3adfdbf3eeee8
Signed-off-by: Prashanth Pai <ppai@redhat.com>
This commit is contained in:
Prashanth Pai 2015-11-17 15:52:06 +05:30
parent 3115575d5d
commit 8bce87a2bb
5 changed files with 8 additions and 17 deletions

View File

@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import sys
import pprint import pprint
import os import os
import json import json
@ -25,12 +24,12 @@ from swiftonfile.swift.common.utils import read_metadata
# Parser Setup # Parser Setup
USAGE = "Usage: %prog [options] OBJECT" USAGE = "Usage: %prog [options] OBJECT"
DESCRIPTION = "Where OBJECT is a file or directory which "\ DESCRIPTION = "Where OBJECT is a file or directory which "\
"its Gluster for Swift metadata will be printed "\ "its Gluster for Swift metadata will be printed "\
"to standard out" "to standard out"
parser = OptionParser(usage=USAGE, description=DESCRIPTION) parser = OptionParser(usage=USAGE, description=DESCRIPTION)
parser.add_option("-J", "--json", dest="json_format", action="store_true", parser.add_option("-J", "--json", dest="json_format", action="store_true",
default=False, help="Print output in JSON format") default=False, help="Print output in JSON format")
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
@ -41,4 +40,3 @@ if options.json_format:
print json.dumps(read_metadata(args[0])) print json.dumps(read_metadata(args[0]))
else: else:
pprint.pprint(read_metadata(args[0])) pprint.pprint(read_metadata(args[0]))

View File

@ -27,7 +27,7 @@ This guide will not provide detailed information on how to prepare a SAIO setup
### Install SwiftOnfile ### Install SwiftOnfile
1. `cd $HOME; git clone https://github.com/swiftonfile/swiftonfile.git` 1. `cd $HOME; git clone https://github.com/openstack/swiftonfile.git`
1. `cd $HOME/swiftonfile; python setup.py develop; cd $HOME` 1. `cd $HOME/swiftonfile; python setup.py develop; cd $HOME`
### Configure SwiftOnFile as Storage Policy ### Configure SwiftOnFile as Storage Policy

View File

@ -20,11 +20,11 @@ from swiftonfile.swift import _pkginfo
setup( setup(
name=_pkginfo.name, name=_pkginfo.name,
version=_pkginfo.full_version, version=_pkginfo.full_version,
description='SwiftOnfile', description='SwiftOnFile',
license='Apache License (2.0)', license='Apache License (2.0)',
author='Red Hat, Inc.', author='Red Hat, Inc.',
author_email='gluster-users@gluster.org', author_email='gluster-users@gluster.org',
url='https://github.com/swiftonfile/swiftonfile', url='https://github.com/openstack/swiftonfile',
packages=find_packages(exclude=['test', 'bin']), packages=find_packages(exclude=['test', 'bin']),
test_suite='nose.collector', test_suite='nose.collector',
classifiers=[ classifiers=[

View File

@ -48,6 +48,7 @@ cp -r etc/* %{buildroot}/%{_confdir}/
%{python_sitelib}/swiftonfile %{python_sitelib}/swiftonfile
%{python_sitelib}/swiftonfile-%{_version}*.egg-info %{python_sitelib}/swiftonfile-%{_version}*.egg-info
%{_bindir}/swiftonfile-print-metadata %{_bindir}/swiftonfile-print-metadata
%{_bindir}/swiftonfile-migrate-metadata
%dir %{_confdir} %dir %{_confdir}
%config(noreplace) %{_confdir}/object-server.conf-swiftonfile %config(noreplace) %{_confdir}/object-server.conf-swiftonfile

10
tox.ini
View File

@ -37,11 +37,6 @@ setenv = VIRTUAL_ENV={envdir}
[tox:jenkins] [tox:jenkins]
downloadcache = ~/cache/pip downloadcache = ~/cache/pip
# To be used by Jenkins
[testenv:functest-ci]
changedir = {toxinidir}
commands = bash ./.functests-ci -q
[testenv:functest] [testenv:functest]
changedir = {toxinidir} changedir = {toxinidir}
commands = bash ./.functests -q commands = bash ./.functests -q
@ -50,15 +45,12 @@ commands = bash ./.functests -q
changedir = {toxinidir} changedir = {toxinidir}
commands = commands =
flake8 swiftonfile test setup.py flake8 swiftonfile test setup.py
flake8 --filename=swiftonfile* bin
[testenv:venv] [testenv:venv]
changedir = {toxinidir} changedir = {toxinidir}
commands = {posargs} commands = {posargs}
[testenv:run]
changedir = {toxinidir}
commands = bash tools/tox_run.sh
[flake8] [flake8]
# it's not a bug that we aren't using all of hacking # it's not a bug that we aren't using all of hacking
# H102 -> apache2 license exists # H102 -> apache2 license exists