<commit_before>#!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible.  If not, see <http://www.gnu.org/licenses/>.

import os
import time
import logging

try:
  from proxmoxer import ProxmoxAPI
  HAS_PROXMOXER = True
except ImportError:
  HAS_PROXMOXER = False
<commit_msg>Added documentation<commit_after>#!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible.  If not, see <http://www.gnu.org/licenses/>.

DOCUMENTATION = '''
---
module: proxmox
short_description: management of instances in Proxmox VE cluster
description:
  - allows you to create/delete/stop instances in Proxmox VE cluster
options:
  api_host:
    description:
      - the host of the Proxmox VE cluster
    default: null
    required: true
  api_user:
    description:
      - the user to authenticate with
    default: null
    required: true
  api_password:
    description:
      - the password to authenticate with
      - you can use PROXMOX_PASSWORD environment variable
    default: null
    required: false
  vmid:
    description:
      - the instance id
    default: null
    required: true
  https_verify_ssl:
    description:
      - enable / disable https certificate verification
    default: false
    required: false
    type: boolean
  node:
    description:
      - Proxmox VE node, when new VM will be created
      - required only for state="present"
      - for another states will be autodiscovered
    default: null
    required: false
  password:
    description:
      - the instance root password
      - required only for state="present"
    default: null
    required: false
  hostname:
    description:
      - the instance hostname
      - required only for state="present"
    default: null
    required: false
  ostemplate:
    description:
      - the template for VM creating
      - required only for state="present"
    default: null
    required: false
  disk:
    description:
      - hard disk size in GB for instance
    default: 3
    required: false
  cpus:
    description:
      - numbers of allocated cpus for instance
    default: 1
    required: false
  memory:
    description:
      - memory size in MB for instance
    default: 512
    required: false
  swap:
    description:
      - swap memory size in MB for instance
    default: 0
    required: false
  netif:
    description:
      - specifies network interfaces for the container
    default: null
    required: false
    type: string
  ip_address:
    description:
      - specifies the address the container will be assigned
    default: null
    required: false
    type: string
  onboot:
    description:
      - specifies whether a VM will be started during system bootup
    default: false
    required: false
    type: boolean
  storage:
    description:
      - target storage
    default: 'local'
    required: false
    type: string
  cpuunits:
    description:
      - CPU weight for a VM
    default: 1000
    required: false
    type: integer
  nameserver:
    description:
      - sets DNS server IP address for a container
    default: null
    required: false
    type: string
  searchdomain:
    description:
      - sets DNS search domain for a container
    default: null
    required: false
    type: string
  timeout:
    description:
      - timeout for operations
    default: 30
    required: false
    type: integer
  force:
    description:
      - forcing operations
      - can be used only with states "present", "stopped", "restarted"
      - with state="present" force option allow to overwrite existing container
      - with states "stopped", "restarted" allow to force stop instance
    default: false
    required: false
    type: boolean
  state:
    description:
     - Indicate desired state of the instance
    choices: ['present', 'started', 'absent', 'stopped', 'restarted']
    default: present
notes:
  - Requires proxmoxer and requests modules on host. This modules can be installed with pip.
requirements: [ "proxmoxer", "requests" ]
author: <NAME>
'''

import os
import time
import logging

try:
  from proxmoxer import ProxmoxAPI
  HAS_PROXMOXER = True
except ImportError:
  HAS_PROXMOXER = False

{'fraction_non_alphanumeric': 0.0592817784533536, 'fraction_numerical': 0.002660079802394072, 'mean_word_length': 2.8906134515890614, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5100376', 'n_tokens_mistral': 1456, 'n_tokens_neox': 1407, 'n_words': 629}