bytemarkhosting / bigv-python Goto Github PK
View Code? Open in Web Editor NEWA Module for BigV which wraps the BigV CLI
A Module for BigV which wraps the BigV CLI
bigv.BigVAccount is a bit of a mouthful, it'd be nicer to rename everything to remove the BigV prefix, so BigVAccount => Account etc.
Would be a nightmare for existing scripts.
Just a suggestion...
I'm trying to create a VM using your playbook as example.
It's failing with this error, any idea why?
/Users/rachel/bitbucket/luzme/devops/ve/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Traceback (most recent call last):
File "/Users/rachel/.ansible/tmp/ansible-tmp-1438593147.6-79780351145889/bigv-vm", line 1780, in
main()
File "/Users/rachel/.ansible/tmp/ansible-tmp-1438593147.6-79780351145889/bigv-vm", line 141, in main
zone_name=module.params['vm_zone_name'],
KeyError: 'vm_zone_name'
New API feature June 2015
This is partially by design. Steps to replicate:
I don't know what the best way around this is, whether we should change the specs (which would probably require restarting the VM anyway, and might cause issues in the case of making a disk smaller than it's filesystem?)
Just needs adding
There's a couple of necessary python modules to run 'import bigv'; I'll do a PR to document them
The Session Tokens from auth don't last forever - it's like 15 minutes or so - if a playbook is taking a long time to run, the token might time out.
We could refresh the token somehow (not sure how this'd work, would need a separate timer thread) or refresh it on use.
This would make most operations faster.
When creating a new disc or VM, the module throws an error. I've not yet managed to work out why, a backtrace is here:
natalya% ansible-playbook -i hosts playbook.yml
TASK: [create the archive disc] ***********************************************
failed: [localhost] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/home/jhannah/.ansible/tmp/ansible-tmp-1398184110.54-136157089249001/bigv-disc", line 1222, in <module>
main()
File "/home/jhannah/.ansible/tmp/ansible-tmp-1398184110.54-136157089249001/bigv-disc", line 116, in main
module.exit_json(changed=True,disc=newdisc.info())
AttributeError: 'NoneType' object has no attribute 'info'
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/jhannah/playbook.retry
localhost : ok=0 changed=0 unreachable=0 failed=1
The change does actually work, and if you run the command again, you'll see that the disc does exist.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.