Giter VIP home page Giter VIP logo

pyproxmox's People

Contributors

daemonthread avatar delin avatar immowetzel avatar papamoose avatar timur-enikeev avatar y0ug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyproxmox's Issues

check backups

Hi, this is not exactly an issue, but an addition to the functionality:
(didn't know where to put it other than here)

I created an Icinga/Nagios script to check all backups in a single check using your Proxmox API.
See:
https://github.com/roland-gsell/check_proxmox_backups

I needed to add a call for cluster/resources, like one of your pull requests already suggests.

how to get the node of a vm

I like to start/stop a specific vm on the node where the vm currently exists.

Therefore I need either to know the current node or a global start.
I dont see any global start command so at first a getNodes would be good
followed by getNodeOfVM(vmId)

Documentation fix for createOpenvzContainer

There is a critical documentation bug within your first example for createOpenvzContainer:

post_data = {'ostemplate':'localvztmpl/debian-6.0-standard_6.0-4_amd64.tar.gz',
The ":" is missing within this line. It has to be:
post_data = {'ostemplate':'local:vztmpl/debian-6.0-standard_6.0-4_amd64.tar.gz',

This cost me 3 hours of my life to find out. :(

method to list containers

There's no provided method to list all openvz containers of a node.
This does the trick however:

>>> data = pve.connect('get','nodes/NODENAME/openvz', None)
>>> [ct['name'] for ct in data['data']]

Many troubles in new code

Hi again!
May be code need serious review. For example in pyproxmox.py:534 - syntax error. In not 'get' requests you are using params keyword instead data. So we have totally broken wrapper.
And may be I`m asking for too much but how about using PEP8 in code?

Error when trying to create Container on Proxmox 4.4 Machine

I'm trying to get the pyproxmox code to create a Container from commandline for me.

# Get Proxmox Authentication Token
auth = prox_auth('<redacted_hostname>','root@pam','<redacted_password>')

# Instantiate the API with the Authentication
proxmox_api = pyproxmox(auth)
post_data = {
    'ostemplate':'data-templates:vztmpl/centos-6-default_20161207_amd64-chef-enabled.tar.xz',
    'vmid': 106,
    'cpus':cores,
    'hostname': fqdn,
    'description': 'Template',
    'memory': memory,
    'net0': 'name=eth0,bridge=vmbr0,ip=%s/16,gw=172.29.254.10' % ip,
    'storage': 'data',
    'password':'template'
  }
  print post_data

  result = proxmox_api.createOpenvzContainer(hostname,post_data)
  print result

The post data looks like this:

{'password': 'template', 'description': 'Template', 'memory': '4096', 'storage': 'data', 'hostname': 'pietje.puk', 'vmid': 106, 'cpus': '1', 'ostemplate': 'data-templates:vztmpl/centos-6-default_20161207_amd64-chef-enabled.tar.xz', 'net0': 'name=eth0,bridge=vmbr0,ip=172.29.111.126/16,gw=172.29.254.10'}

The result looks like this. Whatever i try, i'm only getting the data: None value back.

/usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:821: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
{u'data': None}

Any ideas?

pip installs code out of date

Hi!
First of all, congratulations and thanks for this great job you've done.
Anyway, I have to write about something that has provided me a headache:
A few days ago I've installed pyproxmox with "sudo pip install pyproxmox".
Everything seemed to work properly, but when I tried to clone a qemu template using "cloneVirtualMachine" I got an error "pyproxmox has no attribute cloneVirtualMachine".
After checking the code, I realized that it was true: the source code of the pyproxmox version I had installed with pip didn't include that method!!
I've had to download it from you github project and manually substitute the "/usr/local/lib/python2.7/dist-packagespyproxmox.py" file with the new one.
Now it works properly.
Regards.

Installing pyproxmox with pip

Hello!
I am using your library and installing it from pypi, but i see that many good features added in last time. So, can you plz add setup.py to repository or update package on pypi?
Thank you.

Proper packaging

Hi, tested pyproxmox yesterday and found it really useful. I plan to use it for various administrative purposes (shinken-proxmox integration would be a first goal).

However, there's no distutils/setuptools/distribute packaging in the source code.

'pip install pyproxmox' does not automatically install the required 'requests'
README says to install 'requests' as well, but that's counter-intuitive, and not what the average python guy testing packages from pypi will expect.

post data optional parameters change

Hello ,
I was trying new virtual machine with createVirtualMachine function. I send to request but return to json error.

{u'errors': {u'password': u'property is not defined in schema and the schema does not allow additional properties'}, u'data': None}

After that, I noticed that the Proxmox api documentation changed. I wanted to share with you.
[https://pve.proxmox.com/pve-docs/api-viewer/index.html]

Invalid Syntax: post_data = {'target', str(target)}

Hi,

When trying to use your wrapper, i get the following error with python2.6:

Traceback (most recent call last):
File "./toto.py", line 4, in
from pyproxmox import prox_auth,pyproxmox
File "/usr/local/lib/python2.6/dist-packages/pyproxmox.py", line 374
post_data = {'target', str(target)}
^
SyntaxError: invalid syntax

Append when importing

Thank you in advance for your help,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.