Various bug fixes
* Fix version dependencies (fixes bug #1104433) * Show error messages with codes (fixes bug #1104496) * Missing options now shows correct error (fixes bug #1105253) Version bumped Change-Id: Ic4889a2c6f024469c5ae7317d8918857aec2bd7e
This commit is contained in:
parent
b27b11b631
commit
bff4af8e90
|
@ -12,3 +12,4 @@ debian/python-libraclient/
|
|||
AUTHORS
|
||||
ChangeLog
|
||||
doc/api
|
||||
*.deb
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
python-libraclient (1.2-1) UNRELEASED; urgency=low
|
||||
|
||||
* Fixed dependencies
|
||||
* Various bug fixes
|
||||
|
||||
-- Andrew Hutchings <andrew@linuxjedi.co.uk> Fri, 25 Jan 2013 08:59:41 -0800
|
||||
|
||||
python-libraclient (1.1-1) UNRELEASED; urgency=low
|
||||
|
||||
* Fixed debian building for tests directory
|
||||
|
|
|
@ -2,7 +2,7 @@ Source: python-libraclient
|
|||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: Andrew Hutchings (LinuxJedi)
|
||||
Build-Depends: debhelper (>=9), python-support (>=1.0), cdbs (>=0.4.111), python-all-dev, python-novaclient (>=2.9)
|
||||
Build-Depends: debhelper (>=9), python-support (>=1.0), cdbs (>=0.4.111), python-all-dev
|
||||
Build-Depends-Indep: python-sphinx (>=1.0), rst2pdf (>=0.16)
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: https://launchpad.net/libra
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
__version__ = "1.1"
|
||||
__version__ = "1.2"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import sys
|
||||
import os
|
||||
from libraapi import LibraAPI
|
||||
from clientoptions import ClientOptions
|
||||
from novaclient import exceptions
|
||||
|
@ -21,6 +23,21 @@ def main():
|
|||
options = ClientOptions()
|
||||
args = options.run()
|
||||
|
||||
required_args = [
|
||||
'os_auth_url', 'os_username', 'os_password', 'os_tenant_name',
|
||||
'os_region_name'
|
||||
]
|
||||
missing_args = 0
|
||||
for req in required_args:
|
||||
test_var = getattr(args, req)
|
||||
if test_var == '':
|
||||
missing_args += 1
|
||||
sys.stderr.write(
|
||||
'{app}: error: argument --{test_var} is required\n'
|
||||
.format(app=os.path.basename(sys.argv[0]), test_var=req))
|
||||
if missing_args:
|
||||
return 2
|
||||
|
||||
api = LibraAPI(args)
|
||||
|
||||
cmd = args.command.replace('-', '_')
|
||||
|
@ -30,5 +47,6 @@ def main():
|
|||
method(args)
|
||||
except exceptions.ClientException as exc:
|
||||
print exc
|
||||
print exc.details
|
||||
|
||||
return 0
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
python_novaclient
|
||||
python_novaclient>=2.10.0
|
||||
requests>=1.0.0
|
||||
|
|
Loading…
Reference in New Issue