id int32 0 252k | repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 |
|---|---|---|---|---|---|---|---|---|---|---|---|
34,100 | saltstack/salt | salt/modules/mongodb.py | user_remove | def user_remove(name, user=None, password=None, host=None, port=None,
database='admin', authdb=None):
'''
Remove a MongoDB user
CLI Example:
.. code-block:: bash
salt '*' mongodb.user_remove <name> <user> <password> <host> <port> <database>
'''
conn = _connect(user, pa... | python | def user_remove(name, user=None, password=None, host=None, port=None,
database='admin', authdb=None):
'''
Remove a MongoDB user
CLI Example:
.. code-block:: bash
salt '*' mongodb.user_remove <name> <user> <password> <host> <port> <database>
'''
conn = _connect(user, pa... | [
"def",
"user_remove",
"(",
"name",
",",
"user",
"=",
"None",
",",
"password",
"=",
"None",
",",
"host",
"=",
"None",
",",
"port",
"=",
"None",
",",
"database",
"=",
"'admin'",
",",
"authdb",
"=",
"None",
")",
":",
"conn",
"=",
"_connect",
"(",
"use... | Remove a MongoDB user
CLI Example:
.. code-block:: bash
salt '*' mongodb.user_remove <name> <user> <password> <host> <port> <database> | [
"Remove",
"a",
"MongoDB",
"user"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mongodb.py#L299-L322 |
34,101 | saltstack/salt | salt/modules/mongodb.py | user_roles_exists | def user_roles_exists(name, roles, database, user=None, password=None, host=None,
port=None, authdb=None):
'''
Checks if a user of a MongoDB database has specified roles
CLI Examples:
.. code-block:: bash
salt '*' mongodb.user_roles_exists johndoe '["readWrite"]' dbname ... | python | def user_roles_exists(name, roles, database, user=None, password=None, host=None,
port=None, authdb=None):
'''
Checks if a user of a MongoDB database has specified roles
CLI Examples:
.. code-block:: bash
salt '*' mongodb.user_roles_exists johndoe '["readWrite"]' dbname ... | [
"def",
"user_roles_exists",
"(",
"name",
",",
"roles",
",",
"database",
",",
"user",
"=",
"None",
",",
"password",
"=",
"None",
",",
"host",
"=",
"None",
",",
"port",
"=",
"None",
",",
"authdb",
"=",
"None",
")",
":",
"try",
":",
"roles",
"=",
"_to... | Checks if a user of a MongoDB database has specified roles
CLI Examples:
.. code-block:: bash
salt '*' mongodb.user_roles_exists johndoe '["readWrite"]' dbname admin adminpwd localhost 27017
.. code-block:: bash
salt '*' mongodb.user_roles_exists johndoe '[{"role": "readWrite", "db": "d... | [
"Checks",
"if",
"a",
"user",
"of",
"a",
"MongoDB",
"database",
"has",
"specified",
"roles"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mongodb.py#L325-L360 |
34,102 | saltstack/salt | salt/modules/mongodb.py | user_grant_roles | def user_grant_roles(name, roles, database, user=None, password=None, host=None,
port=None, authdb=None):
'''
Grant one or many roles to a MongoDB user
CLI Examples:
.. code-block:: bash
salt '*' mongodb.user_grant_roles johndoe '["readWrite"]' dbname admin adminpwd local... | python | def user_grant_roles(name, roles, database, user=None, password=None, host=None,
port=None, authdb=None):
'''
Grant one or many roles to a MongoDB user
CLI Examples:
.. code-block:: bash
salt '*' mongodb.user_grant_roles johndoe '["readWrite"]' dbname admin adminpwd local... | [
"def",
"user_grant_roles",
"(",
"name",
",",
"roles",
",",
"database",
",",
"user",
"=",
"None",
",",
"password",
"=",
"None",
",",
"host",
"=",
"None",
",",
"port",
"=",
"None",
",",
"authdb",
"=",
"None",
")",
":",
"conn",
"=",
"_connect",
"(",
"... | Grant one or many roles to a MongoDB user
CLI Examples:
.. code-block:: bash
salt '*' mongodb.user_grant_roles johndoe '["readWrite"]' dbname admin adminpwd localhost 27017
.. code-block:: bash
salt '*' mongodb.user_grant_roles janedoe '[{"role": "readWrite", "db": "dbname" }, {"role": ... | [
"Grant",
"one",
"or",
"many",
"roles",
"to",
"a",
"MongoDB",
"user"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mongodb.py#L363-L395 |
34,103 | saltstack/salt | salt/modules/mongodb.py | insert | def insert(objects, collection, user=None, password=None,
host=None, port=None, database='admin', authdb=None):
'''
Insert an object or list of objects into a collection
CLI Example:
.. code-block:: bash
salt '*' mongodb.insert '[{"foo": "FOO", "bar": "BAR"}, {"foo": "BAZ", "bar": ... | python | def insert(objects, collection, user=None, password=None,
host=None, port=None, database='admin', authdb=None):
'''
Insert an object or list of objects into a collection
CLI Example:
.. code-block:: bash
salt '*' mongodb.insert '[{"foo": "FOO", "bar": "BAR"}, {"foo": "BAZ", "bar": ... | [
"def",
"insert",
"(",
"objects",
",",
"collection",
",",
"user",
"=",
"None",
",",
"password",
"=",
"None",
",",
"host",
"=",
"None",
",",
"port",
"=",
"None",
",",
"database",
"=",
"'admin'",
",",
"authdb",
"=",
"None",
")",
":",
"conn",
"=",
"_co... | Insert an object or list of objects into a collection
CLI Example:
.. code-block:: bash
salt '*' mongodb.insert '[{"foo": "FOO", "bar": "BAR"}, {"foo": "BAZ", "bar": "BAM"}]' mycollection <user> <password> <host> <port> <database> | [
"Insert",
"an",
"object",
"or",
"list",
"of",
"objects",
"into",
"a",
"collection"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mongodb.py#L433-L462 |
34,104 | saltstack/salt | salt/modules/mongodb.py | find | def find(collection, query=None, user=None, password=None,
host=None, port=None, database='admin', authdb=None):
'''
Find an object or list of objects in a collection
CLI Example:
.. code-block:: bash
salt '*' mongodb.find mycollection '[{"foo": "FOO", "bar": "BAR"}]' <user> <passwor... | python | def find(collection, query=None, user=None, password=None,
host=None, port=None, database='admin', authdb=None):
'''
Find an object or list of objects in a collection
CLI Example:
.. code-block:: bash
salt '*' mongodb.find mycollection '[{"foo": "FOO", "bar": "BAR"}]' <user> <passwor... | [
"def",
"find",
"(",
"collection",
",",
"query",
"=",
"None",
",",
"user",
"=",
"None",
",",
"password",
"=",
"None",
",",
"host",
"=",
"None",
",",
"port",
"=",
"None",
",",
"database",
"=",
"'admin'",
",",
"authdb",
"=",
"None",
")",
":",
"conn",
... | Find an object or list of objects in a collection
CLI Example:
.. code-block:: bash
salt '*' mongodb.find mycollection '[{"foo": "FOO", "bar": "BAR"}]' <user> <password> <host> <port> <database> | [
"Find",
"an",
"object",
"or",
"list",
"of",
"objects",
"in",
"a",
"collection"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mongodb.py#L533-L562 |
34,105 | saltstack/salt | salt/proxy/marathon.py | init | def init(opts):
'''
Perform any needed setup.
'''
if CONFIG_BASE_URL in opts['proxy']:
CONFIG[CONFIG_BASE_URL] = opts['proxy'][CONFIG_BASE_URL]
else:
log.error('missing proxy property %s', CONFIG_BASE_URL)
log.debug('CONFIG: %s', CONFIG) | python | def init(opts):
'''
Perform any needed setup.
'''
if CONFIG_BASE_URL in opts['proxy']:
CONFIG[CONFIG_BASE_URL] = opts['proxy'][CONFIG_BASE_URL]
else:
log.error('missing proxy property %s', CONFIG_BASE_URL)
log.debug('CONFIG: %s', CONFIG) | [
"def",
"init",
"(",
"opts",
")",
":",
"if",
"CONFIG_BASE_URL",
"in",
"opts",
"[",
"'proxy'",
"]",
":",
"CONFIG",
"[",
"CONFIG_BASE_URL",
"]",
"=",
"opts",
"[",
"'proxy'",
"]",
"[",
"CONFIG_BASE_URL",
"]",
"else",
":",
"log",
".",
"error",
"(",
"'missin... | Perform any needed setup. | [
"Perform",
"any",
"needed",
"setup",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/marathon.py#L43-L51 |
34,106 | saltstack/salt | salt/proxy/marathon.py | ping | def ping():
'''
Is the marathon api responding?
'''
try:
response = salt.utils.http.query(
"{0}/ping".format(CONFIG[CONFIG_BASE_URL]),
decode_type='plain',
decode=True,
)
log.debug(
'marathon.info returned successfully: %s',
... | python | def ping():
'''
Is the marathon api responding?
'''
try:
response = salt.utils.http.query(
"{0}/ping".format(CONFIG[CONFIG_BASE_URL]),
decode_type='plain',
decode=True,
)
log.debug(
'marathon.info returned successfully: %s',
... | [
"def",
"ping",
"(",
")",
":",
"try",
":",
"response",
"=",
"salt",
".",
"utils",
".",
"http",
".",
"query",
"(",
"\"{0}/ping\"",
".",
"format",
"(",
"CONFIG",
"[",
"CONFIG_BASE_URL",
"]",
")",
",",
"decode_type",
"=",
"'plain'",
",",
"decode",
"=",
"... | Is the marathon api responding? | [
"Is",
"the",
"marathon",
"api",
"responding?"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/marathon.py#L54-L76 |
34,107 | saltstack/salt | salt/modules/glance.py | _auth | def _auth(profile=None, api_version=2, **connection_args):
'''
Set up glance credentials, returns
`glanceclient.client.Client`. Optional parameter
"api_version" defaults to 2.
Only intended to be used within glance-enabled modules
'''
__utils__['versions.warn_until'](
'Neon',
... | python | def _auth(profile=None, api_version=2, **connection_args):
'''
Set up glance credentials, returns
`glanceclient.client.Client`. Optional parameter
"api_version" defaults to 2.
Only intended to be used within glance-enabled modules
'''
__utils__['versions.warn_until'](
'Neon',
... | [
"def",
"_auth",
"(",
"profile",
"=",
"None",
",",
"api_version",
"=",
"2",
",",
"*",
"*",
"connection_args",
")",
":",
"__utils__",
"[",
"'versions.warn_until'",
"]",
"(",
"'Neon'",
",",
"(",
"'The glance module has been deprecated and will be removed in {version}. '... | Set up glance credentials, returns
`glanceclient.client.Client`. Optional parameter
"api_version" defaults to 2.
Only intended to be used within glance-enabled modules | [
"Set",
"up",
"glance",
"credentials",
"returns",
"glanceclient",
".",
"client",
".",
"Client",
".",
"Optional",
"parameter",
"api_version",
"defaults",
"to",
"2",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glance.py#L98-L182 |
34,108 | saltstack/salt | salt/modules/glance.py | _add_image | def _add_image(collection, image):
'''
Add image to given dictionary
'''
image_prep = {
'id': image.id,
'name': image.name,
'created_at': image.created_at,
'file': image.file,
'min_disk': image.min_disk,
'min_ram': image.min_ram,
... | python | def _add_image(collection, image):
'''
Add image to given dictionary
'''
image_prep = {
'id': image.id,
'name': image.name,
'created_at': image.created_at,
'file': image.file,
'min_disk': image.min_disk,
'min_ram': image.min_ram,
... | [
"def",
"_add_image",
"(",
"collection",
",",
"image",
")",
":",
"image_prep",
"=",
"{",
"'id'",
":",
"image",
".",
"id",
",",
"'name'",
":",
"image",
".",
"name",
",",
"'created_at'",
":",
"image",
".",
"created_at",
",",
"'file'",
":",
"image",
".",
... | Add image to given dictionary | [
"Add",
"image",
"to",
"given",
"dictionary"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glance.py#L185-L216 |
34,109 | saltstack/salt | salt/states/loop.py | until | def until(name,
m_args=None,
m_kwargs=None,
condition=None,
period=0,
timeout=604800):
'''
Loop over an execution module until a condition is met.
name
The name of the execution module
m_args
The execution module's positional arguments
... | python | def until(name,
m_args=None,
m_kwargs=None,
condition=None,
period=0,
timeout=604800):
'''
Loop over an execution module until a condition is met.
name
The name of the execution module
m_args
The execution module's positional arguments
... | [
"def",
"until",
"(",
"name",
",",
"m_args",
"=",
"None",
",",
"m_kwargs",
"=",
"None",
",",
"condition",
"=",
"None",
",",
"period",
"=",
"0",
",",
"timeout",
"=",
"604800",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
... | Loop over an execution module until a condition is met.
name
The name of the execution module
m_args
The execution module's positional arguments
m_kwargs
The execution module's keyword arguments
condition
The condition which must be met for the loop to break. This
... | [
"Loop",
"over",
"an",
"execution",
"module",
"until",
"a",
"condition",
"is",
"met",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/loop.py#L47-L118 |
34,110 | saltstack/salt | salt/cloud/clouds/proxmox.py | _authenticate | def _authenticate():
'''
Retrieve CSRF and API tickets for the Proxmox API
'''
global url, port, ticket, csrf, verify_ssl
url = config.get_cloud_config_value(
'url', get_configured_provider(), __opts__, search_global=False
)
port = config.get_cloud_config_value(
'port', get_c... | python | def _authenticate():
'''
Retrieve CSRF and API tickets for the Proxmox API
'''
global url, port, ticket, csrf, verify_ssl
url = config.get_cloud_config_value(
'url', get_configured_provider(), __opts__, search_global=False
)
port = config.get_cloud_config_value(
'port', get_c... | [
"def",
"_authenticate",
"(",
")",
":",
"global",
"url",
",",
"port",
",",
"ticket",
",",
"csrf",
",",
"verify_ssl",
"url",
"=",
"config",
".",
"get_cloud_config_value",
"(",
"'url'",
",",
"get_configured_provider",
"(",
")",
",",
"__opts__",
",",
"search_glo... | Retrieve CSRF and API tickets for the Proxmox API | [
"Retrieve",
"CSRF",
"and",
"API",
"tickets",
"for",
"the",
"Proxmox",
"API"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L116-L146 |
34,111 | saltstack/salt | salt/cloud/clouds/proxmox.py | query | def query(conn_type, option, post_data=None):
'''
Execute the HTTP request to the API
'''
if ticket is None or csrf is None or url is None:
log.debug('Not authenticated yet, doing that now..')
_authenticate()
full_url = 'https://{0}:{1}/api2/json/{2}'.format(url, port, option)
... | python | def query(conn_type, option, post_data=None):
'''
Execute the HTTP request to the API
'''
if ticket is None or csrf is None or url is None:
log.debug('Not authenticated yet, doing that now..')
_authenticate()
full_url = 'https://{0}:{1}/api2/json/{2}'.format(url, port, option)
... | [
"def",
"query",
"(",
"conn_type",
",",
"option",
",",
"post_data",
"=",
"None",
")",
":",
"if",
"ticket",
"is",
"None",
"or",
"csrf",
"is",
"None",
"or",
"url",
"is",
"None",
":",
"log",
".",
"debug",
"(",
"'Not authenticated yet, doing that now..'",
")",
... | Execute the HTTP request to the API | [
"Execute",
"the",
"HTTP",
"request",
"to",
"the",
"API"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L149-L196 |
34,112 | saltstack/salt | salt/cloud/clouds/proxmox.py | _get_vm_by_name | def _get_vm_by_name(name, allDetails=False):
'''
Since Proxmox works based op id's rather than names as identifiers this
requires some filtering to retrieve the required information.
'''
vms = get_resources_vms(includeConfig=allDetails)
if name in vms:
return vms[name]
log.info('VM ... | python | def _get_vm_by_name(name, allDetails=False):
'''
Since Proxmox works based op id's rather than names as identifiers this
requires some filtering to retrieve the required information.
'''
vms = get_resources_vms(includeConfig=allDetails)
if name in vms:
return vms[name]
log.info('VM ... | [
"def",
"_get_vm_by_name",
"(",
"name",
",",
"allDetails",
"=",
"False",
")",
":",
"vms",
"=",
"get_resources_vms",
"(",
"includeConfig",
"=",
"allDetails",
")",
"if",
"name",
"in",
"vms",
":",
"return",
"vms",
"[",
"name",
"]",
"log",
".",
"info",
"(",
... | Since Proxmox works based op id's rather than names as identifiers this
requires some filtering to retrieve the required information. | [
"Since",
"Proxmox",
"works",
"based",
"op",
"id",
"s",
"rather",
"than",
"names",
"as",
"identifiers",
"this",
"requires",
"some",
"filtering",
"to",
"retrieve",
"the",
"required",
"information",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L199-L209 |
34,113 | saltstack/salt | salt/cloud/clouds/proxmox.py | _get_vm_by_id | def _get_vm_by_id(vmid, allDetails=False):
'''
Retrieve a VM based on the ID.
'''
for vm_name, vm_details in six.iteritems(get_resources_vms(includeConfig=allDetails)):
if six.text_type(vm_details['vmid']) == six.text_type(vmid):
return vm_details
log.info('VM with ID "%s" could... | python | def _get_vm_by_id(vmid, allDetails=False):
'''
Retrieve a VM based on the ID.
'''
for vm_name, vm_details in six.iteritems(get_resources_vms(includeConfig=allDetails)):
if six.text_type(vm_details['vmid']) == six.text_type(vmid):
return vm_details
log.info('VM with ID "%s" could... | [
"def",
"_get_vm_by_id",
"(",
"vmid",
",",
"allDetails",
"=",
"False",
")",
":",
"for",
"vm_name",
",",
"vm_details",
"in",
"six",
".",
"iteritems",
"(",
"get_resources_vms",
"(",
"includeConfig",
"=",
"allDetails",
")",
")",
":",
"if",
"six",
".",
"text_ty... | Retrieve a VM based on the ID. | [
"Retrieve",
"a",
"VM",
"based",
"on",
"the",
"ID",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L212-L221 |
34,114 | saltstack/salt | salt/cloud/clouds/proxmox.py | _check_ip_available | def _check_ip_available(ip_addr):
'''
Proxmox VMs refuse to start when the IP is already being used.
This function can be used to prevent VMs being created with duplicate
IP's or to generate a warning.
'''
for vm_name, vm_details in six.iteritems(get_resources_vms(includeConfig=True)):
v... | python | def _check_ip_available(ip_addr):
'''
Proxmox VMs refuse to start when the IP is already being used.
This function can be used to prevent VMs being created with duplicate
IP's or to generate a warning.
'''
for vm_name, vm_details in six.iteritems(get_resources_vms(includeConfig=True)):
v... | [
"def",
"_check_ip_available",
"(",
"ip_addr",
")",
":",
"for",
"vm_name",
",",
"vm_details",
"in",
"six",
".",
"iteritems",
"(",
"get_resources_vms",
"(",
"includeConfig",
"=",
"True",
")",
")",
":",
"vm_config",
"=",
"vm_details",
"[",
"'config'",
"]",
"if"... | Proxmox VMs refuse to start when the IP is already being used.
This function can be used to prevent VMs being created with duplicate
IP's or to generate a warning. | [
"Proxmox",
"VMs",
"refuse",
"to",
"start",
"when",
"the",
"IP",
"is",
"already",
"being",
"used",
".",
"This",
"function",
"can",
"be",
"used",
"to",
"prevent",
"VMs",
"being",
"created",
"with",
"duplicate",
"IP",
"s",
"or",
"to",
"generate",
"a",
"warn... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L232-L245 |
34,115 | saltstack/salt | salt/cloud/clouds/proxmox.py | _parse_proxmox_upid | def _parse_proxmox_upid(node, vm_=None):
'''
Upon requesting a task that runs for a longer period of time a UPID is given.
This includes information about the job and can be used to lookup information in the log.
'''
ret = {}
upid = node
# Parse node response
node = node.split(':')
... | python | def _parse_proxmox_upid(node, vm_=None):
'''
Upon requesting a task that runs for a longer period of time a UPID is given.
This includes information about the job and can be used to lookup information in the log.
'''
ret = {}
upid = node
# Parse node response
node = node.split(':')
... | [
"def",
"_parse_proxmox_upid",
"(",
"node",
",",
"vm_",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"upid",
"=",
"node",
"# Parse node response",
"node",
"=",
"node",
".",
"split",
"(",
"':'",
")",
"if",
"node",
"[",
"0",
"]",
"==",
"'UPID'",
":",
... | Upon requesting a task that runs for a longer period of time a UPID is given.
This includes information about the job and can be used to lookup information in the log. | [
"Upon",
"requesting",
"a",
"task",
"that",
"runs",
"for",
"a",
"longer",
"period",
"of",
"time",
"a",
"UPID",
"is",
"given",
".",
"This",
"includes",
"information",
"about",
"the",
"job",
"and",
"can",
"be",
"used",
"to",
"lookup",
"information",
"in",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L248-L272 |
34,116 | saltstack/salt | salt/cloud/clouds/proxmox.py | get_resources_vms | def get_resources_vms(call=None, resFilter=None, includeConfig=True):
'''
Retrieve all VMs available on this environment
CLI Example:
.. code-block:: bash
salt-cloud -f get_resources_vms my-proxmox-config
'''
timeoutTime = time.time() + 60
while True:
log.debug('Getting r... | python | def get_resources_vms(call=None, resFilter=None, includeConfig=True):
'''
Retrieve all VMs available on this environment
CLI Example:
.. code-block:: bash
salt-cloud -f get_resources_vms my-proxmox-config
'''
timeoutTime = time.time() + 60
while True:
log.debug('Getting r... | [
"def",
"get_resources_vms",
"(",
"call",
"=",
"None",
",",
"resFilter",
"=",
"None",
",",
"includeConfig",
"=",
"True",
")",
":",
"timeoutTime",
"=",
"time",
".",
"time",
"(",
")",
"+",
"60",
"while",
"True",
":",
"log",
".",
"debug",
"(",
"'Getting re... | Retrieve all VMs available on this environment
CLI Example:
.. code-block:: bash
salt-cloud -f get_resources_vms my-proxmox-config | [
"Retrieve",
"all",
"VMs",
"available",
"on",
"this",
"environment"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L319-L372 |
34,117 | saltstack/salt | salt/cloud/clouds/proxmox.py | script | def script(vm_):
'''
Return the script deployment object
'''
script_name = config.get_cloud_config_value('script', vm_, __opts__)
if not script_name:
script_name = 'bootstrap-salt'
return salt.utils.cloud.os_script(
script_name,
vm_,
__opts__,
salt.utils.... | python | def script(vm_):
'''
Return the script deployment object
'''
script_name = config.get_cloud_config_value('script', vm_, __opts__)
if not script_name:
script_name = 'bootstrap-salt'
return salt.utils.cloud.os_script(
script_name,
vm_,
__opts__,
salt.utils.... | [
"def",
"script",
"(",
"vm_",
")",
":",
"script_name",
"=",
"config",
".",
"get_cloud_config_value",
"(",
"'script'",
",",
"vm_",
",",
"__opts__",
")",
"if",
"not",
"script_name",
":",
"script_name",
"=",
"'bootstrap-salt'",
"return",
"salt",
".",
"utils",
".... | Return the script deployment object | [
"Return",
"the",
"script",
"deployment",
"object"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L375-L390 |
34,118 | saltstack/salt | salt/cloud/clouds/proxmox.py | list_nodes | def list_nodes(call=None):
'''
Return a list of the VMs that are managed by the provider
CLI Example:
.. code-block:: bash
salt-cloud -Q my-proxmox-config
'''
if call == 'action':
raise SaltCloudSystemExit(
'The list_nodes function must be called with -f or --funct... | python | def list_nodes(call=None):
'''
Return a list of the VMs that are managed by the provider
CLI Example:
.. code-block:: bash
salt-cloud -Q my-proxmox-config
'''
if call == 'action':
raise SaltCloudSystemExit(
'The list_nodes function must be called with -f or --funct... | [
"def",
"list_nodes",
"(",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The list_nodes function must be called with -f or --function.'",
")",
"ret",
"=",
"{",
"}",
"for",
"vm_name",
",",
"vm_details",
"i... | Return a list of the VMs that are managed by the provider
CLI Example:
.. code-block:: bash
salt-cloud -Q my-proxmox-config | [
"Return",
"a",
"list",
"of",
"the",
"VMs",
"that",
"are",
"managed",
"by",
"the",
"provider"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L443-L485 |
34,119 | saltstack/salt | salt/cloud/clouds/proxmox.py | _get_properties | def _get_properties(path="", method="GET", forced_params=None):
'''
Return the parameter list from api for defined path and HTTP method
'''
if api is None:
_import_api()
sub = api
path_levels = [level for level in path.split('/') if level != '']
search_path = ''
props = []
p... | python | def _get_properties(path="", method="GET", forced_params=None):
'''
Return the parameter list from api for defined path and HTTP method
'''
if api is None:
_import_api()
sub = api
path_levels = [level for level in path.split('/') if level != '']
search_path = ''
props = []
p... | [
"def",
"_get_properties",
"(",
"path",
"=",
"\"\"",
",",
"method",
"=",
"\"GET\"",
",",
"forced_params",
"=",
"None",
")",
":",
"if",
"api",
"is",
"None",
":",
"_import_api",
"(",
")",
"sub",
"=",
"api",
"path_levels",
"=",
"[",
"level",
"for",
"level"... | Return the parameter list from api for defined path and HTTP method | [
"Return",
"the",
"parameter",
"list",
"from",
"api",
"for",
"defined",
"path",
"and",
"HTTP",
"method"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L885-L919 |
34,120 | saltstack/salt | salt/cloud/clouds/proxmox.py | get_vmconfig | def get_vmconfig(vmid, node=None, node_type='openvz'):
'''
Get VM configuration
'''
if node is None:
# We need to figure out which node this VM is on.
for host_name, host_details in six.iteritems(avail_locations()):
for item in query('get', 'nodes/{0}/{1}'.format(host_name, n... | python | def get_vmconfig(vmid, node=None, node_type='openvz'):
'''
Get VM configuration
'''
if node is None:
# We need to figure out which node this VM is on.
for host_name, host_details in six.iteritems(avail_locations()):
for item in query('get', 'nodes/{0}/{1}'.format(host_name, n... | [
"def",
"get_vmconfig",
"(",
"vmid",
",",
"node",
"=",
"None",
",",
"node_type",
"=",
"'openvz'",
")",
":",
"if",
"node",
"is",
"None",
":",
"# We need to figure out which node this VM is on.",
"for",
"host_name",
",",
"host_details",
"in",
"six",
".",
"iteritems... | Get VM configuration | [
"Get",
"VM",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L1059-L1073 |
34,121 | saltstack/salt | salt/cloud/clouds/proxmox.py | wait_for_task | def wait_for_task(upid, timeout=300):
'''
Wait until a the task has been finished successfully
'''
start_time = time.time()
info = _lookup_proxmox_task(upid)
if not info:
log.error('wait_for_task: No task information '
'retrieved based on given criteria.')
raise... | python | def wait_for_task(upid, timeout=300):
'''
Wait until a the task has been finished successfully
'''
start_time = time.time()
info = _lookup_proxmox_task(upid)
if not info:
log.error('wait_for_task: No task information '
'retrieved based on given criteria.')
raise... | [
"def",
"wait_for_task",
"(",
"upid",
",",
"timeout",
"=",
"300",
")",
":",
"start_time",
"=",
"time",
".",
"time",
"(",
")",
"info",
"=",
"_lookup_proxmox_task",
"(",
"upid",
")",
"if",
"not",
"info",
":",
"log",
".",
"error",
"(",
"'wait_for_task: No ta... | Wait until a the task has been finished successfully | [
"Wait",
"until",
"a",
"the",
"task",
"has",
"been",
"finished",
"successfully"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L1122-L1141 |
34,122 | saltstack/salt | salt/cloud/clouds/proxmox.py | set_vm_status | def set_vm_status(status, name=None, vmid=None):
'''
Convenience function for setting VM status
'''
log.debug('Set status to %s for %s (%s)', status, name, vmid)
if vmid is not None:
log.debug('set_vm_status: via ID - VMID %s (%s): %s',
vmid, name, status)
vmobj = ... | python | def set_vm_status(status, name=None, vmid=None):
'''
Convenience function for setting VM status
'''
log.debug('Set status to %s for %s (%s)', status, name, vmid)
if vmid is not None:
log.debug('set_vm_status: via ID - VMID %s (%s): %s',
vmid, name, status)
vmobj = ... | [
"def",
"set_vm_status",
"(",
"status",
",",
"name",
"=",
"None",
",",
"vmid",
"=",
"None",
")",
":",
"log",
".",
"debug",
"(",
"'Set status to %s for %s (%s)'",
",",
"status",
",",
"name",
",",
"vmid",
")",
"if",
"vmid",
"is",
"not",
"None",
":",
"log"... | Convenience function for setting VM status | [
"Convenience",
"function",
"for",
"setting",
"VM",
"status"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L1201-L1231 |
34,123 | saltstack/salt | salt/cloud/clouds/proxmox.py | get_vm_status | def get_vm_status(vmid=None, name=None):
'''
Get the status for a VM, either via the ID or the hostname
'''
if vmid is not None:
log.debug('get_vm_status: VMID %s', vmid)
vmobj = _get_vm_by_id(vmid)
elif name is not None:
log.debug('get_vm_status: name %s', name)
vmob... | python | def get_vm_status(vmid=None, name=None):
'''
Get the status for a VM, either via the ID or the hostname
'''
if vmid is not None:
log.debug('get_vm_status: VMID %s', vmid)
vmobj = _get_vm_by_id(vmid)
elif name is not None:
log.debug('get_vm_status: name %s', name)
vmob... | [
"def",
"get_vm_status",
"(",
"vmid",
"=",
"None",
",",
"name",
"=",
"None",
")",
":",
"if",
"vmid",
"is",
"not",
"None",
":",
"log",
".",
"debug",
"(",
"'get_vm_status: VMID %s'",
",",
"vmid",
")",
"vmobj",
"=",
"_get_vm_by_id",
"(",
"vmid",
")",
"elif... | Get the status for a VM, either via the ID or the hostname | [
"Get",
"the",
"status",
"for",
"a",
"VM",
"either",
"via",
"the",
"ID",
"or",
"the",
"hostname"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/proxmox.py#L1234-L1258 |
34,124 | saltstack/salt | salt/states/rsync.py | _get_summary | def _get_summary(rsync_out):
'''
Get summary from the rsync successful output.
'''
return "- " + "\n- ".join([elm for elm in rsync_out.split("\n\n")[-1].replace(" ", "\n").split("\n") if elm]) | python | def _get_summary(rsync_out):
'''
Get summary from the rsync successful output.
'''
return "- " + "\n- ".join([elm for elm in rsync_out.split("\n\n")[-1].replace(" ", "\n").split("\n") if elm]) | [
"def",
"_get_summary",
"(",
"rsync_out",
")",
":",
"return",
"\"- \"",
"+",
"\"\\n- \"",
".",
"join",
"(",
"[",
"elm",
"for",
"elm",
"in",
"rsync_out",
".",
"split",
"(",
"\"\\n\\n\"",
")",
"[",
"-",
"1",
"]",
".",
"replace",
"(",
"\" \"",
",",
"\"\... | Get summary from the rsync successful output. | [
"Get",
"summary",
"from",
"the",
"rsync",
"successful",
"output",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/rsync.py#L48-L53 |
34,125 | saltstack/salt | salt/states/rsync.py | _get_changes | def _get_changes(rsync_out):
'''
Get changes from the rsync successful output.
'''
copied = list()
deleted = list()
for line in rsync_out.split("\n\n")[0].split("\n")[1:]:
if line.startswith("deleting "):
deleted.append(line.split(" ", 1)[-1])
else:
copie... | python | def _get_changes(rsync_out):
'''
Get changes from the rsync successful output.
'''
copied = list()
deleted = list()
for line in rsync_out.split("\n\n")[0].split("\n")[1:]:
if line.startswith("deleting "):
deleted.append(line.split(" ", 1)[-1])
else:
copie... | [
"def",
"_get_changes",
"(",
"rsync_out",
")",
":",
"copied",
"=",
"list",
"(",
")",
"deleted",
"=",
"list",
"(",
")",
"for",
"line",
"in",
"rsync_out",
".",
"split",
"(",
"\"\\n\\n\"",
")",
"[",
"0",
"]",
".",
"split",
"(",
"\"\\n\"",
")",
"[",
"1"... | Get changes from the rsync successful output. | [
"Get",
"changes",
"from",
"the",
"rsync",
"successful",
"output",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/rsync.py#L56-L77 |
34,126 | saltstack/salt | salt/states/rsync.py | synchronized | def synchronized(name, source,
delete=False,
force=False,
update=False,
passwordfile=None,
exclude=None,
excludefrom=None,
prepare=False,
dryrun=False,
additional_opts... | python | def synchronized(name, source,
delete=False,
force=False,
update=False,
passwordfile=None,
exclude=None,
excludefrom=None,
prepare=False,
dryrun=False,
additional_opts... | [
"def",
"synchronized",
"(",
"name",
",",
"source",
",",
"delete",
"=",
"False",
",",
"force",
"=",
"False",
",",
"update",
"=",
"False",
",",
"passwordfile",
"=",
"None",
",",
"exclude",
"=",
"None",
",",
"excludefrom",
"=",
"None",
",",
"prepare",
"="... | Guarantees that the source directory is always copied to the target.
name
Name of the target directory.
source
Source directory.
prepare
Create destination directory if it does not exists.
delete
Delete extraneous files from the destination dirs (True or False)
f... | [
"Guarantees",
"that",
"the",
"source",
"directory",
"is",
"always",
"copied",
"to",
"the",
"target",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/rsync.py#L80-L170 |
34,127 | saltstack/salt | salt/modules/cisconso.py | get_data | def get_data(datastore, path):
'''
Get the configuration of the device tree at the given path
:param datastore: The datastore, e.g. running, operational.
One of the NETCONF store IETF types
:type datastore: :class:`DatastoreType` (``str`` enum).
:param path: The device path to set the val... | python | def get_data(datastore, path):
'''
Get the configuration of the device tree at the given path
:param datastore: The datastore, e.g. running, operational.
One of the NETCONF store IETF types
:type datastore: :class:`DatastoreType` (``str`` enum).
:param path: The device path to set the val... | [
"def",
"get_data",
"(",
"datastore",
",",
"path",
")",
":",
"if",
"isinstance",
"(",
"path",
",",
"six",
".",
"string_types",
")",
":",
"path",
"=",
"'/'",
".",
"split",
"(",
"path",
")",
"return",
"_proxy_cmd",
"(",
"'get_data'",
",",
"datastore",
","... | Get the configuration of the device tree at the given path
:param datastore: The datastore, e.g. running, operational.
One of the NETCONF store IETF types
:type datastore: :class:`DatastoreType` (``str`` enum).
:param path: The device path to set the value at,
a list of element names in o... | [
"Get",
"the",
"configuration",
"of",
"the",
"device",
"tree",
"at",
"the",
"given",
"path"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cisconso.py#L37-L58 |
34,128 | saltstack/salt | salt/modules/cisconso.py | set_data_value | def set_data_value(datastore, path, data):
'''
Set a data entry in a datastore
:param datastore: The datastore, e.g. running, operational.
One of the NETCONF store IETF types
:type datastore: :class:`DatastoreType` (``str`` enum).
:param path: The device path to set the value at,
... | python | def set_data_value(datastore, path, data):
'''
Set a data entry in a datastore
:param datastore: The datastore, e.g. running, operational.
One of the NETCONF store IETF types
:type datastore: :class:`DatastoreType` (``str`` enum).
:param path: The device path to set the value at,
... | [
"def",
"set_data_value",
"(",
"datastore",
",",
"path",
",",
"data",
")",
":",
"if",
"isinstance",
"(",
"path",
",",
"six",
".",
"string_types",
")",
":",
"path",
"=",
"'/'",
".",
"split",
"(",
"path",
")",
"return",
"_proxy_cmd",
"(",
"'set_data_value'"... | Set a data entry in a datastore
:param datastore: The datastore, e.g. running, operational.
One of the NETCONF store IETF types
:type datastore: :class:`DatastoreType` (``str`` enum).
:param path: The device path to set the value at,
a list of element names in order, / separated
:type... | [
"Set",
"a",
"data",
"entry",
"in",
"a",
"datastore"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cisconso.py#L61-L85 |
34,129 | saltstack/salt | salt/states/postgres_initdb.py | present | def present(name,
user=None,
password=None,
auth='password',
encoding='UTF8',
locale=None,
runas=None,
waldir=None,
checksums=False):
'''
Initialize the PostgreSQL data directory
name
The name of the directory to initialize
user
... | python | def present(name,
user=None,
password=None,
auth='password',
encoding='UTF8',
locale=None,
runas=None,
waldir=None,
checksums=False):
'''
Initialize the PostgreSQL data directory
name
The name of the directory to initialize
user
... | [
"def",
"present",
"(",
"name",
",",
"user",
"=",
"None",
",",
"password",
"=",
"None",
",",
"auth",
"=",
"'password'",
",",
"encoding",
"=",
"'UTF8'",
",",
"locale",
"=",
"None",
",",
"runas",
"=",
"None",
",",
"waldir",
"=",
"None",
",",
"checksums"... | Initialize the PostgreSQL data directory
name
The name of the directory to initialize
user
The database superuser name
password
The password to set for the postgres user
auth
The default authentication method for local connections
encoding
The default enc... | [
"Initialize",
"the",
"PostgreSQL",
"data",
"directory"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/postgres_initdb.py#L39-L121 |
34,130 | saltstack/salt | salt/modules/wordpress.py | list_plugins | def list_plugins(path, user):
'''
List plugins in an installed wordpress path
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.list_plugins /var/www/html apache
'''
ret = []
resp ... | python | def list_plugins(path, user):
'''
List plugins in an installed wordpress path
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.list_plugins /var/www/html apache
'''
ret = []
resp ... | [
"def",
"list_plugins",
"(",
"path",
",",
"user",
")",
":",
"ret",
"=",
"[",
"]",
"resp",
"=",
"__salt__",
"[",
"'cmd.shell'",
"]",
"(",
"(",
"'wp --path={0} plugin list'",
")",
".",
"format",
"(",
"path",
")",
",",
"runas",
"=",
"user",
")",
"for",
"... | List plugins in an installed wordpress path
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.list_plugins /var/www/html apache | [
"List",
"plugins",
"in",
"an",
"installed",
"wordpress",
"path"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/wordpress.py#L29-L51 |
34,131 | saltstack/salt | salt/modules/wordpress.py | show_plugin | def show_plugin(name, path, user):
'''
Show a plugin in a wordpress install and check if it is installed
name
Wordpress plugin name
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpre... | python | def show_plugin(name, path, user):
'''
Show a plugin in a wordpress install and check if it is installed
name
Wordpress plugin name
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpre... | [
"def",
"show_plugin",
"(",
"name",
",",
"path",
",",
"user",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
"}",
"resp",
"=",
"__salt__",
"[",
"'cmd.shell'",
"]",
"(",
"(",
"'wp --path={0} plugin status {1}'",
")",
".",
"format",
"(",
"path",
",",
"... | Show a plugin in a wordpress install and check if it is installed
name
Wordpress plugin name
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.show_plugin HyperDB /var/www/html apache | [
"Show",
"a",
"plugin",
"in",
"a",
"wordpress",
"install",
"and",
"check",
"if",
"it",
"is",
"installed"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/wordpress.py#L54-L82 |
34,132 | saltstack/salt | salt/modules/wordpress.py | activate | def activate(name, path, user):
'''
Activate a wordpress plugin
name
Wordpress plugin name
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.activate HyperDB /var/www/html apache
... | python | def activate(name, path, user):
'''
Activate a wordpress plugin
name
Wordpress plugin name
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.activate HyperDB /var/www/html apache
... | [
"def",
"activate",
"(",
"name",
",",
"path",
",",
"user",
")",
":",
"check",
"=",
"show_plugin",
"(",
"name",
",",
"path",
",",
"user",
")",
"if",
"check",
"[",
"'status'",
"]",
"==",
"'active'",
":",
"# already active",
"return",
"None",
"resp",
"=",
... | Activate a wordpress plugin
name
Wordpress plugin name
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.activate HyperDB /var/www/html apache | [
"Activate",
"a",
"wordpress",
"plugin"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/wordpress.py#L85-L115 |
34,133 | saltstack/salt | salt/modules/wordpress.py | is_installed | def is_installed(path, user=None):
'''
Check if wordpress is installed and setup
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.is_installed /var/www/html apache
'''
retcode = __sal... | python | def is_installed(path, user=None):
'''
Check if wordpress is installed and setup
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.is_installed /var/www/html apache
'''
retcode = __sal... | [
"def",
"is_installed",
"(",
"path",
",",
"user",
"=",
"None",
")",
":",
"retcode",
"=",
"__salt__",
"[",
"'cmd.retcode'",
"]",
"(",
"(",
"'wp --path={0} core is-installed'",
")",
".",
"format",
"(",
"path",
")",
",",
"runas",
"=",
"user",
")",
"if",
"ret... | Check if wordpress is installed and setup
path
path to wordpress install location
user
user to run the command as
CLI Example:
.. code-block:: bash
salt '*' wordpress.is_installed /var/www/html apache | [
"Check",
"if",
"wordpress",
"is",
"installed",
"and",
"setup"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/wordpress.py#L151-L172 |
34,134 | saltstack/salt | salt/modules/wordpress.py | install | def install(path, user, admin_user, admin_password, admin_email, title, url):
'''
Run the initial setup functions for a wordpress install
path
path to wordpress install location
user
user to run the command as
admin_user
Username for the Administrative user for the wordpre... | python | def install(path, user, admin_user, admin_password, admin_email, title, url):
'''
Run the initial setup functions for a wordpress install
path
path to wordpress install location
user
user to run the command as
admin_user
Username for the Administrative user for the wordpre... | [
"def",
"install",
"(",
"path",
",",
"user",
",",
"admin_user",
",",
"admin_password",
",",
"admin_email",
",",
"title",
",",
"url",
")",
":",
"retcode",
"=",
"__salt__",
"[",
"'cmd.retcode'",
"]",
"(",
"(",
"'wp --path={0} core install '",
"'--title=\"{1}\" '",
... | Run the initial setup functions for a wordpress install
path
path to wordpress install location
user
user to run the command as
admin_user
Username for the Administrative user for the wordpress install
admin_password
Initial Password for the Administrative user for th... | [
"Run",
"the",
"initial",
"setup",
"functions",
"for",
"a",
"wordpress",
"install"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/wordpress.py#L175-L225 |
34,135 | saltstack/salt | salt/matchers/grain_pcre_match.py | match | def match(tgt, delimiter=DEFAULT_TARGET_DELIM, opts=None):
'''
Matches a grain based on regex
'''
if not opts:
opts = __opts__
log.debug('grains pcre target: %s', tgt)
if delimiter not in tgt:
log.error('Got insufficient arguments for grains pcre match '
'statem... | python | def match(tgt, delimiter=DEFAULT_TARGET_DELIM, opts=None):
'''
Matches a grain based on regex
'''
if not opts:
opts = __opts__
log.debug('grains pcre target: %s', tgt)
if delimiter not in tgt:
log.error('Got insufficient arguments for grains pcre match '
'statem... | [
"def",
"match",
"(",
"tgt",
",",
"delimiter",
"=",
"DEFAULT_TARGET_DELIM",
",",
"opts",
"=",
"None",
")",
":",
"if",
"not",
"opts",
":",
"opts",
"=",
"__opts__",
"log",
".",
"debug",
"(",
"'grains pcre target: %s'",
",",
"tgt",
")",
"if",
"delimiter",
"n... | Matches a grain based on regex | [
"Matches",
"a",
"grain",
"based",
"on",
"regex"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/matchers/grain_pcre_match.py#L15-L28 |
34,136 | saltstack/salt | salt/utils/yamldumper.py | safe_dump | def safe_dump(data, stream=None, **kwargs):
'''
Use a custom dumper to ensure that defaultdict and OrderedDict are
represented properly. Ensure that unicode strings are encoded unless
explicitly told not to.
'''
if 'allow_unicode' not in kwargs:
kwargs['allow_unicode'] = True
return ... | python | def safe_dump(data, stream=None, **kwargs):
'''
Use a custom dumper to ensure that defaultdict and OrderedDict are
represented properly. Ensure that unicode strings are encoded unless
explicitly told not to.
'''
if 'allow_unicode' not in kwargs:
kwargs['allow_unicode'] = True
return ... | [
"def",
"safe_dump",
"(",
"data",
",",
"stream",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"'allow_unicode'",
"not",
"in",
"kwargs",
":",
"kwargs",
"[",
"'allow_unicode'",
"]",
"=",
"True",
"return",
"yaml",
".",
"dump",
"(",
"data",
",",
... | Use a custom dumper to ensure that defaultdict and OrderedDict are
represented properly. Ensure that unicode strings are encoded unless
explicitly told not to. | [
"Use",
"a",
"custom",
"dumper",
"to",
"ensure",
"that",
"defaultdict",
"and",
"OrderedDict",
"are",
"represented",
"properly",
".",
"Ensure",
"that",
"unicode",
"strings",
"are",
"encoded",
"unless",
"explicitly",
"told",
"not",
"to",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/yamldumper.py#L128-L136 |
34,137 | saltstack/salt | salt/cloud/clouds/opennebula.py | avail_images | def avail_images(call=None):
'''
Return available OpenNebula images.
CLI Example:
.. code-block:: bash
salt-cloud --list-images opennebula
salt-cloud --function avail_images opennebula
salt-cloud -f avail_images opennebula
'''
if call == 'action':
raise SaltCl... | python | def avail_images(call=None):
'''
Return available OpenNebula images.
CLI Example:
.. code-block:: bash
salt-cloud --list-images opennebula
salt-cloud --function avail_images opennebula
salt-cloud -f avail_images opennebula
'''
if call == 'action':
raise SaltCl... | [
"def",
"avail_images",
"(",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The avail_images function must be called with '",
"'-f or --function, or with the --list-images option'",
")",
"server",
",",
"user",
","... | Return available OpenNebula images.
CLI Example:
.. code-block:: bash
salt-cloud --list-images opennebula
salt-cloud --function avail_images opennebula
salt-cloud -f avail_images opennebula | [
"Return",
"available",
"OpenNebula",
"images",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L132-L160 |
34,138 | saltstack/salt | salt/cloud/clouds/opennebula.py | avail_locations | def avail_locations(call=None):
'''
Return available OpenNebula locations.
CLI Example:
.. code-block:: bash
salt-cloud --list-locations opennebula
salt-cloud --function avail_locations opennebula
salt-cloud -f avail_locations opennebula
'''
if call == 'action':
... | python | def avail_locations(call=None):
'''
Return available OpenNebula locations.
CLI Example:
.. code-block:: bash
salt-cloud --list-locations opennebula
salt-cloud --function avail_locations opennebula
salt-cloud -f avail_locations opennebula
'''
if call == 'action':
... | [
"def",
"avail_locations",
"(",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The avail_locations function must be called with '",
"'-f or --function, or with the --list-locations option.'",
")",
"server",
",",
"us... | Return available OpenNebula locations.
CLI Example:
.. code-block:: bash
salt-cloud --list-locations opennebula
salt-cloud --function avail_locations opennebula
salt-cloud -f avail_locations opennebula | [
"Return",
"available",
"OpenNebula",
"locations",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L163-L190 |
34,139 | saltstack/salt | salt/cloud/clouds/opennebula.py | list_clusters | def list_clusters(call=None):
'''
Returns a list of clusters in OpenNebula.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_clusters opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
'The list_clusters function must... | python | def list_clusters(call=None):
'''
Returns a list of clusters in OpenNebula.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_clusters opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
'The list_clusters function must... | [
"def",
"list_clusters",
"(",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The list_clusters function must be called with -f or --function.'",
")",
"server",
",",
"user",
",",
"password",
"=",
"_get_xml_rpc"... | Returns a list of clusters in OpenNebula.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_clusters opennebula | [
"Returns",
"a",
"list",
"of",
"clusters",
"in",
"OpenNebula",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L212-L237 |
34,140 | saltstack/salt | salt/cloud/clouds/opennebula.py | list_datastores | def list_datastores(call=None):
'''
Returns a list of data stores on OpenNebula.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_datastores opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
'The list_datastores func... | python | def list_datastores(call=None):
'''
Returns a list of data stores on OpenNebula.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_datastores opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
'The list_datastores func... | [
"def",
"list_datastores",
"(",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The list_datastores function must be called with -f or --function.'",
")",
"server",
",",
"user",
",",
"password",
"=",
"_get_xml_... | Returns a list of data stores on OpenNebula.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_datastores opennebula | [
"Returns",
"a",
"list",
"of",
"data",
"stores",
"on",
"OpenNebula",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L240-L265 |
34,141 | saltstack/salt | salt/cloud/clouds/opennebula.py | list_security_groups | def list_security_groups(call=None):
'''
Lists all security groups available to the user and the user's groups.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_security_groups opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
... | python | def list_security_groups(call=None):
'''
Lists all security groups available to the user and the user's groups.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_security_groups opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
... | [
"def",
"list_security_groups",
"(",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The list_security_groups function must be called with -f or --function.'",
")",
"server",
",",
"user",
",",
"password",
"=",
... | Lists all security groups available to the user and the user's groups.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_security_groups opennebula | [
"Lists",
"all",
"security",
"groups",
"available",
"to",
"the",
"user",
"and",
"the",
"user",
"s",
"groups",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L346-L371 |
34,142 | saltstack/salt | salt/cloud/clouds/opennebula.py | list_templates | def list_templates(call=None):
'''
Lists all templates available to the user and the user's groups.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_templates opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
'The li... | python | def list_templates(call=None):
'''
Lists all templates available to the user and the user's groups.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_templates opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
'The li... | [
"def",
"list_templates",
"(",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The list_templates function must be called with -f or --function.'",
")",
"server",
",",
"user",
",",
"password",
"=",
"_get_xml_rp... | Lists all templates available to the user and the user's groups.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_templates opennebula | [
"Lists",
"all",
"templates",
"available",
"to",
"the",
"user",
"and",
"the",
"user",
"s",
"groups",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L374-L399 |
34,143 | saltstack/salt | salt/cloud/clouds/opennebula.py | list_vns | def list_vns(call=None):
'''
Lists all virtual networks available to the user and the user's groups.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_vns opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
'The list_vn... | python | def list_vns(call=None):
'''
Lists all virtual networks available to the user and the user's groups.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_vns opennebula
'''
if call == 'action':
raise SaltCloudSystemExit(
'The list_vn... | [
"def",
"list_vns",
"(",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The list_vns function must be called with -f or --function.'",
")",
"server",
",",
"user",
",",
"password",
"=",
"_get_xml_rpc",
"(",
... | Lists all virtual networks available to the user and the user's groups.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f list_vns opennebula | [
"Lists",
"all",
"virtual",
"networks",
"available",
"to",
"the",
"user",
"and",
"the",
"user",
"s",
"groups",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L402-L427 |
34,144 | saltstack/salt | salt/cloud/clouds/opennebula.py | reboot | def reboot(name, call=None):
'''
Reboot a VM.
.. versionadded:: 2016.3.0
name
The name of the VM to reboot.
CLI Example:
.. code-block:: bash
salt-cloud -a reboot my-vm
'''
if call != 'action':
raise SaltCloudSystemExit(
'The start action must be ... | python | def reboot(name, call=None):
'''
Reboot a VM.
.. versionadded:: 2016.3.0
name
The name of the VM to reboot.
CLI Example:
.. code-block:: bash
salt-cloud -a reboot my-vm
'''
if call != 'action':
raise SaltCloudSystemExit(
'The start action must be ... | [
"def",
"reboot",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The start action must be called with -a or --action.'",
")",
"log",
".",
"info",
"(",
"'Rebooting node %s'",
",",
"name",
... | Reboot a VM.
.. versionadded:: 2016.3.0
name
The name of the VM to reboot.
CLI Example:
.. code-block:: bash
salt-cloud -a reboot my-vm | [
"Reboot",
"a",
"VM",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L430-L452 |
34,145 | saltstack/salt | salt/cloud/clouds/opennebula.py | start | def start(name, call=None):
'''
Start a VM.
.. versionadded:: 2016.3.0
name
The name of the VM to start.
CLI Example:
.. code-block:: bash
salt-cloud -a start my-vm
'''
if call != 'action':
raise SaltCloudSystemExit(
'The start action must be call... | python | def start(name, call=None):
'''
Start a VM.
.. versionadded:: 2016.3.0
name
The name of the VM to start.
CLI Example:
.. code-block:: bash
salt-cloud -a start my-vm
'''
if call != 'action':
raise SaltCloudSystemExit(
'The start action must be call... | [
"def",
"start",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The start action must be called with -a or --action.'",
")",
"log",
".",
"info",
"(",
"'Starting node %s'",
",",
"name",
... | Start a VM.
.. versionadded:: 2016.3.0
name
The name of the VM to start.
CLI Example:
.. code-block:: bash
salt-cloud -a start my-vm | [
"Start",
"a",
"VM",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L455-L477 |
34,146 | saltstack/salt | salt/cloud/clouds/opennebula.py | stop | def stop(name, call=None):
'''
Stop a VM.
.. versionadded:: 2016.3.0
name
The name of the VM to stop.
CLI Example:
.. code-block:: bash
salt-cloud -a stop my-vm
'''
if call != 'action':
raise SaltCloudSystemExit(
'The start action must be called w... | python | def stop(name, call=None):
'''
Stop a VM.
.. versionadded:: 2016.3.0
name
The name of the VM to stop.
CLI Example:
.. code-block:: bash
salt-cloud -a stop my-vm
'''
if call != 'action':
raise SaltCloudSystemExit(
'The start action must be called w... | [
"def",
"stop",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The start action must be called with -a or --action.'",
")",
"log",
".",
"info",
"(",
"'Stopping node %s'",
",",
"name",
"... | Stop a VM.
.. versionadded:: 2016.3.0
name
The name of the VM to stop.
CLI Example:
.. code-block:: bash
salt-cloud -a stop my-vm | [
"Stop",
"a",
"VM",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L480-L502 |
34,147 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_one_version | def get_one_version(kwargs=None, call=None):
'''
Returns the OpenNebula version.
.. versionadded:: 2016.3.5
CLI Example:
.. code-block:: bash
salt-cloud -f get_one_version one_provider_name
'''
if call == 'action':
raise SaltCloudSystemExit(
'The get_cluster_... | python | def get_one_version(kwargs=None, call=None):
'''
Returns the OpenNebula version.
.. versionadded:: 2016.3.5
CLI Example:
.. code-block:: bash
salt-cloud -f get_one_version one_provider_name
'''
if call == 'action':
raise SaltCloudSystemExit(
'The get_cluster_... | [
"def",
"get_one_version",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_cluster_id function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"Non... | Returns the OpenNebula version.
.. versionadded:: 2016.3.5
CLI Example:
.. code-block:: bash
salt-cloud -f get_one_version one_provider_name | [
"Returns",
"the",
"OpenNebula",
"version",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L505-L529 |
34,148 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_cluster_id | def get_cluster_id(kwargs=None, call=None):
'''
Returns a cluster's ID from the given cluster name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_cluster_id opennebula name=my-cluster-name
'''
if call == 'action':
raise SaltCloudSystemExit... | python | def get_cluster_id(kwargs=None, call=None):
'''
Returns a cluster's ID from the given cluster name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_cluster_id opennebula name=my-cluster-name
'''
if call == 'action':
raise SaltCloudSystemExit... | [
"def",
"get_cluster_id",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_cluster_id function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None... | Returns a cluster's ID from the given cluster name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_cluster_id opennebula name=my-cluster-name | [
"Returns",
"a",
"cluster",
"s",
"ID",
"from",
"the",
"given",
"cluster",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L532-L565 |
34,149 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_datastore_id | def get_datastore_id(kwargs=None, call=None):
'''
Returns a data store's ID from the given data store name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_datastore_id opennebula name=my-datastore-name
'''
if call == 'action':
raise SaltClo... | python | def get_datastore_id(kwargs=None, call=None):
'''
Returns a data store's ID from the given data store name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_datastore_id opennebula name=my-datastore-name
'''
if call == 'action':
raise SaltClo... | [
"def",
"get_datastore_id",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_datastore_id function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"... | Returns a data store's ID from the given data store name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_datastore_id opennebula name=my-datastore-name | [
"Returns",
"a",
"data",
"store",
"s",
"ID",
"from",
"the",
"given",
"data",
"store",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L568-L601 |
34,150 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_host_id | def get_host_id(kwargs=None, call=None):
'''
Returns a host's ID from the given host name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_host_id opennebula name=my-host-name
'''
if call == 'action':
raise SaltCloudSystemExit(
'... | python | def get_host_id(kwargs=None, call=None):
'''
Returns a host's ID from the given host name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_host_id opennebula name=my-host-name
'''
if call == 'action':
raise SaltCloudSystemExit(
'... | [
"def",
"get_host_id",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_host_id function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
"... | Returns a host's ID from the given host name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_host_id opennebula name=my-host-name | [
"Returns",
"a",
"host",
"s",
"ID",
"from",
"the",
"given",
"host",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L604-L637 |
34,151 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_image | def get_image(vm_):
r'''
Return the image object to use.
vm\_
The VM dictionary for which to obtain an image.
'''
images = avail_images()
vm_image = six.text_type(config.get_cloud_config_value(
'image', vm_, __opts__, search_global=False
))
for image in images:
i... | python | def get_image(vm_):
r'''
Return the image object to use.
vm\_
The VM dictionary for which to obtain an image.
'''
images = avail_images()
vm_image = six.text_type(config.get_cloud_config_value(
'image', vm_, __opts__, search_global=False
))
for image in images:
i... | [
"def",
"get_image",
"(",
"vm_",
")",
":",
"images",
"=",
"avail_images",
"(",
")",
"vm_image",
"=",
"six",
".",
"text_type",
"(",
"config",
".",
"get_cloud_config_value",
"(",
"'image'",
",",
"vm_",
",",
"__opts__",
",",
"search_global",
"=",
"False",
")",... | r'''
Return the image object to use.
vm\_
The VM dictionary for which to obtain an image. | [
"r",
"Return",
"the",
"image",
"object",
"to",
"use",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L640-L656 |
34,152 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_image_id | def get_image_id(kwargs=None, call=None):
'''
Returns an image's ID from the given image name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_image_id opennebula name=my-image-name
'''
if call == 'action':
raise SaltCloudSystemExit(
... | python | def get_image_id(kwargs=None, call=None):
'''
Returns an image's ID from the given image name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_image_id opennebula name=my-image-name
'''
if call == 'action':
raise SaltCloudSystemExit(
... | [
"def",
"get_image_id",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_image_id function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
... | Returns an image's ID from the given image name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_image_id opennebula name=my-image-name | [
"Returns",
"an",
"image",
"s",
"ID",
"from",
"the",
"given",
"image",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L659-L692 |
34,153 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_secgroup_id | def get_secgroup_id(kwargs=None, call=None):
'''
Returns a security group's ID from the given security group name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_secgroup_id opennebula name=my-secgroup-name
'''
if call == 'action':
raise Sa... | python | def get_secgroup_id(kwargs=None, call=None):
'''
Returns a security group's ID from the given security group name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_secgroup_id opennebula name=my-secgroup-name
'''
if call == 'action':
raise Sa... | [
"def",
"get_secgroup_id",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_secgroup_id function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"No... | Returns a security group's ID from the given security group name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_secgroup_id opennebula name=my-secgroup-name | [
"Returns",
"a",
"security",
"group",
"s",
"ID",
"from",
"the",
"given",
"security",
"group",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L721-L754 |
34,154 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_template_image | def get_template_image(kwargs=None, call=None):
'''
Returns a template's image from the given template name.
.. versionadded:: 2018.3.0
.. code-block:: bash
salt-cloud -f get_template_image opennebula name=my-template-name
'''
if call == 'action':
raise SaltCloudSystemExit(
... | python | def get_template_image(kwargs=None, call=None):
'''
Returns a template's image from the given template name.
.. versionadded:: 2018.3.0
.. code-block:: bash
salt-cloud -f get_template_image opennebula name=my-template-name
'''
if call == 'action':
raise SaltCloudSystemExit(
... | [
"def",
"get_template_image",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_template_image function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",... | Returns a template's image from the given template name.
.. versionadded:: 2018.3.0
.. code-block:: bash
salt-cloud -f get_template_image opennebula name=my-template-name | [
"Returns",
"a",
"template",
"s",
"image",
"from",
"the",
"given",
"template",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L757-L788 |
34,155 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_template | def get_template(vm_):
r'''
Return the template id for a VM.
.. versionadded:: 2016.11.0
vm\_
The VM dictionary for which to obtain a template.
'''
vm_template = six.text_type(config.get_cloud_config_value(
'template', vm_, __opts__, search_global=False
))
try:
... | python | def get_template(vm_):
r'''
Return the template id for a VM.
.. versionadded:: 2016.11.0
vm\_
The VM dictionary for which to obtain a template.
'''
vm_template = six.text_type(config.get_cloud_config_value(
'template', vm_, __opts__, search_global=False
))
try:
... | [
"def",
"get_template",
"(",
"vm_",
")",
":",
"vm_template",
"=",
"six",
".",
"text_type",
"(",
"config",
".",
"get_cloud_config_value",
"(",
"'template'",
",",
"vm_",
",",
"__opts__",
",",
"search_global",
"=",
"False",
")",
")",
"try",
":",
"return",
"lis... | r'''
Return the template id for a VM.
.. versionadded:: 2016.11.0
vm\_
The VM dictionary for which to obtain a template. | [
"r",
"Return",
"the",
"template",
"id",
"for",
"a",
"VM",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L827-L845 |
34,156 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_vm_id | def get_vm_id(kwargs=None, call=None):
'''
Returns a virtual machine's ID from the given virtual machine's name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_vm_id opennebula name=my-vm
'''
if call == 'action':
raise SaltCloudSystemExit(
... | python | def get_vm_id(kwargs=None, call=None):
'''
Returns a virtual machine's ID from the given virtual machine's name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_vm_id opennebula name=my-vm
'''
if call == 'action':
raise SaltCloudSystemExit(
... | [
"def",
"get_vm_id",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_vm_id function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
":",
... | Returns a virtual machine's ID from the given virtual machine's name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_vm_id opennebula name=my-vm | [
"Returns",
"a",
"virtual",
"machine",
"s",
"ID",
"from",
"the",
"given",
"virtual",
"machine",
"s",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L848-L881 |
34,157 | saltstack/salt | salt/cloud/clouds/opennebula.py | get_vn_id | def get_vn_id(kwargs=None, call=None):
'''
Returns a virtual network's ID from the given virtual network's name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_vn_id opennebula name=my-vn-name
'''
if call == 'action':
raise SaltCloudSystemE... | python | def get_vn_id(kwargs=None, call=None):
'''
Returns a virtual network's ID from the given virtual network's name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_vn_id opennebula name=my-vn-name
'''
if call == 'action':
raise SaltCloudSystemE... | [
"def",
"get_vn_id",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_vn_id function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
":",
... | Returns a virtual network's ID from the given virtual network's name.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt-cloud -f get_vn_id opennebula name=my-vn-name | [
"Returns",
"a",
"virtual",
"network",
"s",
"ID",
"from",
"the",
"given",
"virtual",
"network",
"s",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L884-L917 |
34,158 | saltstack/salt | salt/cloud/clouds/opennebula.py | _get_device_template | def _get_device_template(disk, disk_info, template=None):
'''
Returns the template format to create a disk in open nebula
.. versionadded:: 2018.3.0
'''
def _require_disk_opts(*args):
for arg in args:
if arg not in disk_info:
raise SaltCloudSystemExit(
... | python | def _get_device_template(disk, disk_info, template=None):
'''
Returns the template format to create a disk in open nebula
.. versionadded:: 2018.3.0
'''
def _require_disk_opts(*args):
for arg in args:
if arg not in disk_info:
raise SaltCloudSystemExit(
... | [
"def",
"_get_device_template",
"(",
"disk",
",",
"disk_info",
",",
"template",
"=",
"None",
")",
":",
"def",
"_require_disk_opts",
"(",
"*",
"args",
")",
":",
"for",
"arg",
"in",
"args",
":",
"if",
"arg",
"not",
"in",
"disk_info",
":",
"raise",
"SaltClou... | Returns the template format to create a disk in open nebula
.. versionadded:: 2018.3.0 | [
"Returns",
"the",
"template",
"format",
"to",
"create",
"a",
"disk",
"in",
"open",
"nebula"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L920-L963 |
34,159 | saltstack/salt | salt/cloud/clouds/opennebula.py | image_allocate | def image_allocate(call=None, kwargs=None):
'''
Allocates a new image in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file containing the template of the image to allocate.
Syntax within the file can be the usual attribute=value or XML. Can be
used instead of ``dat... | python | def image_allocate(call=None, kwargs=None):
'''
Allocates a new image in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file containing the template of the image to allocate.
Syntax within the file can be the usual attribute=value or XML. Can be
used instead of ``dat... | [
"def",
"image_allocate",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The image_allocate function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"No... | Allocates a new image in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file containing the template of the image to allocate.
Syntax within the file can be the usual attribute=value or XML. Can be
used instead of ``data``.
data
The data containing the template ... | [
"Allocates",
"a",
"new",
"image",
"in",
"OpenNebula",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L1243-L1328 |
34,160 | saltstack/salt | salt/cloud/clouds/opennebula.py | image_clone | def image_clone(call=None, kwargs=None):
'''
Clones an existing image.
.. versionadded:: 2016.3.0
name
The name of the new image.
image_id
The ID of the image to be cloned. Can be used instead of ``image_name``.
image_name
The name of the image to be cloned. Can be us... | python | def image_clone(call=None, kwargs=None):
'''
Clones an existing image.
.. versionadded:: 2016.3.0
name
The name of the new image.
image_id
The ID of the image to be cloned. Can be used instead of ``image_name``.
image_name
The name of the image to be cloned. Can be us... | [
"def",
"image_clone",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The image_clone function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
... | Clones an existing image.
.. versionadded:: 2016.3.0
name
The name of the new image.
image_id
The ID of the image to be cloned. Can be used instead of ``image_name``.
image_name
The name of the image to be cloned. Can be used instead of ``image_id``.
CLI Example:
..... | [
"Clones",
"an",
"existing",
"image",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L1331-L1396 |
34,161 | saltstack/salt | salt/cloud/clouds/opennebula.py | image_info | def image_info(call=None, kwargs=None):
'''
Retrieves information for a given image. Either a name or an image_id must be
supplied.
.. versionadded:: 2016.3.0
name
The name of the image for which to gather information. Can be used instead
of ``image_id``.
image_id
The ... | python | def image_info(call=None, kwargs=None):
'''
Retrieves information for a given image. Either a name or an image_id must be
supplied.
.. versionadded:: 2016.3.0
name
The name of the image for which to gather information. Can be used instead
of ``image_id``.
image_id
The ... | [
"def",
"image_info",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The image_info function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
"... | Retrieves information for a given image. Either a name or an image_id must be
supplied.
.. versionadded:: 2016.3.0
name
The name of the image for which to gather information. Can be used instead
of ``image_id``.
image_id
The ID of the image for which to gather information. Can... | [
"Retrieves",
"information",
"for",
"a",
"given",
"image",
".",
"Either",
"a",
"name",
"or",
"an",
"image_id",
"must",
"be",
"supplied",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L1458-L1513 |
34,162 | saltstack/salt | salt/cloud/clouds/opennebula.py | image_persistent | def image_persistent(call=None, kwargs=None):
'''
Sets the Image as persistent or not persistent.
.. versionadded:: 2016.3.0
name
The name of the image to set. Can be used instead of ``image_id``.
image_id
The ID of the image to set. Can be used instead of ``name``.
persist
... | python | def image_persistent(call=None, kwargs=None):
'''
Sets the Image as persistent or not persistent.
.. versionadded:: 2016.3.0
name
The name of the image to set. Can be used instead of ``image_id``.
image_id
The ID of the image to set. Can be used instead of ``name``.
persist
... | [
"def",
"image_persistent",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The image_persistent function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
... | Sets the Image as persistent or not persistent.
.. versionadded:: 2016.3.0
name
The name of the image to set. Can be used instead of ``image_id``.
image_id
The ID of the image to set. Can be used instead of ``name``.
persist
A boolean value to set the image as persistent or n... | [
"Sets",
"the",
"Image",
"as",
"persistent",
"or",
"not",
"persistent",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L1516-L1582 |
34,163 | saltstack/salt | salt/cloud/clouds/opennebula.py | image_snapshot_delete | def image_snapshot_delete(call=None, kwargs=None):
'''
Deletes a snapshot from the image.
.. versionadded:: 2016.3.0
image_id
The ID of the image from which to delete the snapshot. Can be used instead of
``image_name``.
image_name
The name of the image from which to delete... | python | def image_snapshot_delete(call=None, kwargs=None):
'''
Deletes a snapshot from the image.
.. versionadded:: 2016.3.0
image_id
The ID of the image from which to delete the snapshot. Can be used instead of
``image_name``.
image_name
The name of the image from which to delete... | [
"def",
"image_snapshot_delete",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The image_snapshot_delete function must be called with -f or --function.'",
")",
"if",
"kwargs",... | Deletes a snapshot from the image.
.. versionadded:: 2016.3.0
image_id
The ID of the image from which to delete the snapshot. Can be used instead of
``image_name``.
image_name
The name of the image from which to delete the snapshot. Can be used instead
of ``image_id``.
... | [
"Deletes",
"a",
"snapshot",
"from",
"the",
"image",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L1585-L1651 |
34,164 | saltstack/salt | salt/cloud/clouds/opennebula.py | image_update | def image_update(call=None, kwargs=None):
'''
Replaces the image template contents.
.. versionadded:: 2016.3.0
image_id
The ID of the image to update. Can be used instead of ``image_name``.
image_name
The name of the image to update. Can be used instead of ``image_id``.
path
... | python | def image_update(call=None, kwargs=None):
'''
Replaces the image template contents.
.. versionadded:: 2016.3.0
image_id
The ID of the image to update. Can be used instead of ``image_name``.
image_name
The name of the image to update. Can be used instead of ``image_id``.
path
... | [
"def",
"image_update",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The image_allocate function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None... | Replaces the image template contents.
.. versionadded:: 2016.3.0
image_id
The ID of the image to update. Can be used instead of ``image_name``.
image_name
The name of the image to update. Can be used instead of ``image_id``.
path
The path to a file containing the template of ... | [
"Replaces",
"the",
"image",
"template",
"contents",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L1789-L1894 |
34,165 | saltstack/salt | salt/cloud/clouds/opennebula.py | secgroup_delete | def secgroup_delete(call=None, kwargs=None):
'''
Deletes the given security group from OpenNebula. Either a name or a secgroup_id
must be supplied.
.. versionadded:: 2016.3.0
name
The name of the security group to delete. Can be used instead of
``secgroup_id``.
secgroup_id
... | python | def secgroup_delete(call=None, kwargs=None):
'''
Deletes the given security group from OpenNebula. Either a name or a secgroup_id
must be supplied.
.. versionadded:: 2016.3.0
name
The name of the security group to delete. Can be used instead of
``secgroup_id``.
secgroup_id
... | [
"def",
"secgroup_delete",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The secgroup_delete function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"... | Deletes the given security group from OpenNebula. Either a name or a secgroup_id
must be supplied.
.. versionadded:: 2016.3.0
name
The name of the security group to delete. Can be used instead of
``secgroup_id``.
secgroup_id
The ID of the security group to delete. Can be used ... | [
"Deletes",
"the",
"given",
"security",
"group",
"from",
"OpenNebula",
".",
"Either",
"a",
"name",
"or",
"a",
"secgroup_id",
"must",
"be",
"supplied",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2060-L2117 |
34,166 | saltstack/salt | salt/cloud/clouds/opennebula.py | secgroup_info | def secgroup_info(call=None, kwargs=None):
'''
Retrieves information for the given security group. Either a name or a
secgroup_id must be supplied.
.. versionadded:: 2016.3.0
name
The name of the security group for which to gather information. Can be
used instead of ``secgroup_id``... | python | def secgroup_info(call=None, kwargs=None):
'''
Retrieves information for the given security group. Either a name or a
secgroup_id must be supplied.
.. versionadded:: 2016.3.0
name
The name of the security group for which to gather information. Can be
used instead of ``secgroup_id``... | [
"def",
"secgroup_info",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The secgroup_info function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None... | Retrieves information for the given security group. Either a name or a
secgroup_id must be supplied.
.. versionadded:: 2016.3.0
name
The name of the security group for which to gather information. Can be
used instead of ``secgroup_id``.
secgroup_id
The ID of the security group... | [
"Retrieves",
"information",
"for",
"the",
"given",
"security",
"group",
".",
"Either",
"a",
"name",
"or",
"a",
"secgroup_id",
"must",
"be",
"supplied",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2120-L2175 |
34,167 | saltstack/salt | salt/cloud/clouds/opennebula.py | secgroup_update | def secgroup_update(call=None, kwargs=None):
'''
Replaces the security group template contents.
.. versionadded:: 2016.3.0
secgroup_id
The ID of the security group to update. Can be used instead of
``secgroup_name``.
secgroup_name
The name of the security group to update. ... | python | def secgroup_update(call=None, kwargs=None):
'''
Replaces the security group template contents.
.. versionadded:: 2016.3.0
secgroup_id
The ID of the security group to update. Can be used instead of
``secgroup_name``.
secgroup_name
The name of the security group to update. ... | [
"def",
"secgroup_update",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The secgroup_allocate function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
... | Replaces the security group template contents.
.. versionadded:: 2016.3.0
secgroup_id
The ID of the security group to update. Can be used instead of
``secgroup_name``.
secgroup_name
The name of the security group to update. Can be used instead of
``secgroup_id``.
path... | [
"Replaces",
"the",
"security",
"group",
"template",
"contents",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2178-L2287 |
34,168 | saltstack/salt | salt/cloud/clouds/opennebula.py | template_allocate | def template_allocate(call=None, kwargs=None):
'''
Allocates a new template in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file containing the elements of the template to be allocated.
Syntax within the file can be the usual attribute=value or XML. Can be used
ins... | python | def template_allocate(call=None, kwargs=None):
'''
Allocates a new template in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file containing the elements of the template to be allocated.
Syntax within the file can be the usual attribute=value or XML. Can be used
ins... | [
"def",
"template_allocate",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The template_allocate function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",... | Allocates a new template in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file containing the elements of the template to be allocated.
Syntax within the file can be the usual attribute=value or XML. Can be used
instead of ``data``.
data
Contains the elements o... | [
"Allocates",
"a",
"new",
"template",
"in",
"OpenNebula",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2290-L2353 |
34,169 | saltstack/salt | salt/cloud/clouds/opennebula.py | template_clone | def template_clone(call=None, kwargs=None):
'''
Clones an existing virtual machine template.
.. versionadded:: 2016.3.0
name
The name of the new template.
template_id
The ID of the template to be cloned. Can be used instead of ``template_name``.
template_name
The name... | python | def template_clone(call=None, kwargs=None):
'''
Clones an existing virtual machine template.
.. versionadded:: 2016.3.0
name
The name of the new template.
template_id
The ID of the template to be cloned. Can be used instead of ``template_name``.
template_name
The name... | [
"def",
"template_clone",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The template_clone function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"No... | Clones an existing virtual machine template.
.. versionadded:: 2016.3.0
name
The name of the new template.
template_id
The ID of the template to be cloned. Can be used instead of ``template_name``.
template_name
The name of the template to be cloned. Can be used instead of ``... | [
"Clones",
"an",
"existing",
"virtual",
"machine",
"template",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2356-L2426 |
34,170 | saltstack/salt | salt/cloud/clouds/opennebula.py | template_delete | def template_delete(call=None, kwargs=None):
'''
Deletes the given template from OpenNebula. Either a name or a template_id must
be supplied.
.. versionadded:: 2016.3.0
name
The name of the template to delete. Can be used instead of ``template_id``.
template_id
The ID of the t... | python | def template_delete(call=None, kwargs=None):
'''
Deletes the given template from OpenNebula. Either a name or a template_id must
be supplied.
.. versionadded:: 2016.3.0
name
The name of the template to delete. Can be used instead of ``template_id``.
template_id
The ID of the t... | [
"def",
"template_delete",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The template_delete function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"... | Deletes the given template from OpenNebula. Either a name or a template_id must
be supplied.
.. versionadded:: 2016.3.0
name
The name of the template to delete. Can be used instead of ``template_id``.
template_id
The ID of the template to delete. Can be used instead of ``name``.
... | [
"Deletes",
"the",
"given",
"template",
"from",
"OpenNebula",
".",
"Either",
"a",
"name",
"or",
"a",
"template_id",
"must",
"be",
"supplied",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2429-L2485 |
34,171 | saltstack/salt | salt/cloud/clouds/opennebula.py | template_instantiate | def template_instantiate(call=None, kwargs=None):
'''
Instantiates a new virtual machine from a template.
.. versionadded:: 2016.3.0
.. note::
``template_instantiate`` creates a VM on OpenNebula from a template, but it
does not install Salt on the new VM. Use the ``create`` function fo... | python | def template_instantiate(call=None, kwargs=None):
'''
Instantiates a new virtual machine from a template.
.. versionadded:: 2016.3.0
.. note::
``template_instantiate`` creates a VM on OpenNebula from a template, but it
does not install Salt on the new VM. Use the ``create`` function fo... | [
"def",
"template_instantiate",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The template_instantiate function must be called with -f or --function.'",
")",
"if",
"kwargs",
... | Instantiates a new virtual machine from a template.
.. versionadded:: 2016.3.0
.. note::
``template_instantiate`` creates a VM on OpenNebula from a template, but it
does not install Salt on the new VM. Use the ``create`` function for that
functionality: ``salt-cloud -p opennebula-profi... | [
"Instantiates",
"a",
"new",
"virtual",
"machine",
"from",
"a",
"template",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2488-L2560 |
34,172 | saltstack/salt | salt/cloud/clouds/opennebula.py | template_update | def template_update(call=None, kwargs=None):
'''
Replaces the template contents.
.. versionadded:: 2016.3.0
template_id
The ID of the template to update. Can be used instead of ``template_name``.
template_name
The name of the template to update. Can be used instead of ``template_i... | python | def template_update(call=None, kwargs=None):
'''
Replaces the template contents.
.. versionadded:: 2016.3.0
template_id
The ID of the template to update. Can be used instead of ``template_name``.
template_name
The name of the template to update. Can be used instead of ``template_i... | [
"def",
"template_update",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The template_update function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"... | Replaces the template contents.
.. versionadded:: 2016.3.0
template_id
The ID of the template to update. Can be used instead of ``template_name``.
template_name
The name of the template to update. Can be used instead of ``template_id``.
path
The path to a file containing the ... | [
"Replaces",
"the",
"template",
"contents",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2563-L2672 |
34,173 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_action | def vm_action(name, kwargs=None, call=None):
'''
Submits an action to be performed on a given virtual machine.
.. versionadded:: 2016.3.0
name
The name of the VM to action.
action
The action to be performed on the VM. Available options include:
- boot
- delete
... | python | def vm_action(name, kwargs=None, call=None):
'''
Submits an action to be performed on a given virtual machine.
.. versionadded:: 2016.3.0
name
The name of the VM to action.
action
The action to be performed on the VM. Available options include:
- boot
- delete
... | [
"def",
"vm_action",
"(",
"name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_action function must be called with -a or --action.'",
")",
"if",
"kwargs",
"is",
... | Submits an action to be performed on a given virtual machine.
.. versionadded:: 2016.3.0
name
The name of the VM to action.
action
The action to be performed on the VM. Available options include:
- boot
- delete
- delete-recreate
- hold
- ... | [
"Submits",
"an",
"action",
"to",
"be",
"performed",
"on",
"a",
"given",
"virtual",
"machine",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2675-L2737 |
34,174 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_allocate | def vm_allocate(call=None, kwargs=None):
'''
Allocates a new virtual machine in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file defining the template of the VM to allocate.
Syntax within the file can be the usual attribute=value or XML.
Can be used instead of ``d... | python | def vm_allocate(call=None, kwargs=None):
'''
Allocates a new virtual machine in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file defining the template of the VM to allocate.
Syntax within the file can be the usual attribute=value or XML.
Can be used instead of ``d... | [
"def",
"vm_allocate",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_allocate function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
... | Allocates a new virtual machine in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file defining the template of the VM to allocate.
Syntax within the file can be the usual attribute=value or XML.
Can be used instead of ``data``.
data
Contains the template defini... | [
"Allocates",
"a",
"new",
"virtual",
"machine",
"in",
"OpenNebula",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2740-L2805 |
34,175 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_attach | def vm_attach(name, kwargs=None, call=None):
'''
Attaches a new disk to the given virtual machine.
.. versionadded:: 2016.3.0
name
The name of the VM for which to attach the new disk.
path
The path to a file containing a single disk vector attribute.
Syntax within the file... | python | def vm_attach(name, kwargs=None, call=None):
'''
Attaches a new disk to the given virtual machine.
.. versionadded:: 2016.3.0
name
The name of the VM for which to attach the new disk.
path
The path to a file containing a single disk vector attribute.
Syntax within the file... | [
"def",
"vm_attach",
"(",
"name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_attach action must be called with -a or --action.'",
")",
"if",
"kwargs",
"is",
"N... | Attaches a new disk to the given virtual machine.
.. versionadded:: 2016.3.0
name
The name of the VM for which to attach the new disk.
path
The path to a file containing a single disk vector attribute.
Syntax within the file can be the usual attribute=value or XML.
Can be ... | [
"Attaches",
"a",
"new",
"disk",
"to",
"the",
"given",
"virtual",
"machine",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2808-L2872 |
34,176 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_deploy | def vm_deploy(name, kwargs=None, call=None):
'''
Initiates the instance of the given VM on the target host.
.. versionadded:: 2016.3.0
name
The name of the VM to deploy.
host_id
The ID of the target host where the VM will be deployed. Can be used instead
of ``host_name``.
... | python | def vm_deploy(name, kwargs=None, call=None):
'''
Initiates the instance of the given VM on the target host.
.. versionadded:: 2016.3.0
name
The name of the VM to deploy.
host_id
The ID of the target host where the VM will be deployed. Can be used instead
of ``host_name``.
... | [
"def",
"vm_deploy",
"(",
"name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_deploy action must be called with -a or --action.'",
")",
"if",
"kwargs",
"is",
"N... | Initiates the instance of the given VM on the target host.
.. versionadded:: 2016.3.0
name
The name of the VM to deploy.
host_id
The ID of the target host where the VM will be deployed. Can be used instead
of ``host_name``.
host_name
The name of the target host where ... | [
"Initiates",
"the",
"instance",
"of",
"the",
"given",
"VM",
"on",
"the",
"target",
"host",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L2942-L3038 |
34,177 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_disk_save | def vm_disk_save(name, kwargs=None, call=None):
'''
Sets the disk to be saved in the given image.
.. versionadded:: 2016.3.0
name
The name of the VM containing the disk to save.
disk_id
The ID of the disk to save.
image_name
The name of the new image where the disk wi... | python | def vm_disk_save(name, kwargs=None, call=None):
'''
Sets the disk to be saved in the given image.
.. versionadded:: 2016.3.0
name
The name of the VM containing the disk to save.
disk_id
The ID of the disk to save.
image_name
The name of the new image where the disk wi... | [
"def",
"vm_disk_save",
"(",
"name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_disk_save action must be called with -a or --action.'",
")",
"if",
"kwargs",
"is"... | Sets the disk to be saved in the given image.
.. versionadded:: 2016.3.0
name
The name of the VM containing the disk to save.
disk_id
The ID of the disk to save.
image_name
The name of the new image where the disk will be saved.
image_type
The type for the new im... | [
"Sets",
"the",
"disk",
"to",
"be",
"saved",
"in",
"the",
"given",
"image",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L3135-L3202 |
34,178 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_disk_snapshot_create | def vm_disk_snapshot_create(name, kwargs=None, call=None):
'''
Takes a new snapshot of the disk image.
.. versionadded:: 2016.3.0
name
The name of the VM of which to take the snapshot.
disk_id
The ID of the disk to save.
description
The description for the snapshot.
... | python | def vm_disk_snapshot_create(name, kwargs=None, call=None):
'''
Takes a new snapshot of the disk image.
.. versionadded:: 2016.3.0
name
The name of the VM of which to take the snapshot.
disk_id
The ID of the disk to save.
description
The description for the snapshot.
... | [
"def",
"vm_disk_snapshot_create",
"(",
"name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_disk_snapshot_create action must be called with -a or --action.'",
")",
"i... | Takes a new snapshot of the disk image.
.. versionadded:: 2016.3.0
name
The name of the VM of which to take the snapshot.
disk_id
The ID of the disk to save.
description
The description for the snapshot.
CLI Example:
.. code-block:: bash
salt-cloud -a vm_di... | [
"Takes",
"a",
"new",
"snapshot",
"of",
"the",
"disk",
"image",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L3205-L3258 |
34,179 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_disk_snapshot_delete | def vm_disk_snapshot_delete(name, kwargs=None, call=None):
'''
Deletes a disk snapshot based on the given VM and the disk_id.
.. versionadded:: 2016.3.0
name
The name of the VM containing the snapshot to delete.
disk_id
The ID of the disk to save.
snapshot_id
The ID o... | python | def vm_disk_snapshot_delete(name, kwargs=None, call=None):
'''
Deletes a disk snapshot based on the given VM and the disk_id.
.. versionadded:: 2016.3.0
name
The name of the VM containing the snapshot to delete.
disk_id
The ID of the disk to save.
snapshot_id
The ID o... | [
"def",
"vm_disk_snapshot_delete",
"(",
"name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_disk_snapshot_delete action must be called with -a or --action.'",
")",
"i... | Deletes a disk snapshot based on the given VM and the disk_id.
.. versionadded:: 2016.3.0
name
The name of the VM containing the snapshot to delete.
disk_id
The ID of the disk to save.
snapshot_id
The ID of the snapshot to be deleted.
CLI Example:
.. code-block:: ba... | [
"Deletes",
"a",
"disk",
"snapshot",
"based",
"on",
"the",
"given",
"VM",
"and",
"the",
"disk_id",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L3261-L3314 |
34,180 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_info | def vm_info(name, call=None):
'''
Retrieves information for a given virtual machine. A VM name must be supplied.
.. versionadded:: 2016.3.0
name
The name of the VM for which to gather information.
CLI Example:
.. code-block:: bash
salt-cloud -a vm_info my-vm
'''
if c... | python | def vm_info(name, call=None):
'''
Retrieves information for a given virtual machine. A VM name must be supplied.
.. versionadded:: 2016.3.0
name
The name of the VM for which to gather information.
CLI Example:
.. code-block:: bash
salt-cloud -a vm_info my-vm
'''
if c... | [
"def",
"vm_info",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_info action must be called with -a or --action.'",
")",
"server",
",",
"user",
",",
"password",
"=",
"_get_xml_rpc... | Retrieves information for a given virtual machine. A VM name must be supplied.
.. versionadded:: 2016.3.0
name
The name of the VM for which to gather information.
CLI Example:
.. code-block:: bash
salt-cloud -a vm_info my-vm | [
"Retrieves",
"information",
"for",
"a",
"given",
"virtual",
"machine",
".",
"A",
"VM",
"name",
"must",
"be",
"supplied",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L3373-L3404 |
34,181 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_monitoring | def vm_monitoring(name, call=None):
'''
Returns the monitoring records for a given virtual machine. A VM name must be
supplied.
The monitoring information returned is a list of VM elements. Each VM element
contains the complete dictionary of the VM with the updated information returned
by the p... | python | def vm_monitoring(name, call=None):
'''
Returns the monitoring records for a given virtual machine. A VM name must be
supplied.
The monitoring information returned is a list of VM elements. Each VM element
contains the complete dictionary of the VM with the updated information returned
by the p... | [
"def",
"vm_monitoring",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_monitoring action must be called with -a or --action.'",
")",
"server",
",",
"user",
",",
"password",
"=",
"... | Returns the monitoring records for a given virtual machine. A VM name must be
supplied.
The monitoring information returned is a list of VM elements. Each VM element
contains the complete dictionary of the VM with the updated information returned
by the poll action.
.. versionadded:: 2016.3.0
... | [
"Returns",
"the",
"monitoring",
"records",
"for",
"a",
"given",
"virtual",
"machine",
".",
"A",
"VM",
"name",
"must",
"be",
"supplied",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L3511-L3551 |
34,182 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_snapshot_create | def vm_snapshot_create(vm_name, kwargs=None, call=None):
'''
Creates a new virtual machine snapshot from the provided VM.
.. versionadded:: 2016.3.0
vm_name
The name of the VM from which to create the snapshot.
snapshot_name
The name of the snapshot to be created.
CLI Example... | python | def vm_snapshot_create(vm_name, kwargs=None, call=None):
'''
Creates a new virtual machine snapshot from the provided VM.
.. versionadded:: 2016.3.0
vm_name
The name of the VM from which to create the snapshot.
snapshot_name
The name of the snapshot to be created.
CLI Example... | [
"def",
"vm_snapshot_create",
"(",
"vm_name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_snapshot_create action must be called with -a or --action.'",
")",
"if",
"... | Creates a new virtual machine snapshot from the provided VM.
.. versionadded:: 2016.3.0
vm_name
The name of the VM from which to create the snapshot.
snapshot_name
The name of the snapshot to be created.
CLI Example:
.. code-block:: bash
salt-cloud -a vm_snapshot_create... | [
"Creates",
"a",
"new",
"virtual",
"machine",
"snapshot",
"from",
"the",
"provided",
"VM",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L3629-L3673 |
34,183 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_snapshot_delete | def vm_snapshot_delete(vm_name, kwargs=None, call=None):
'''
Deletes a virtual machine snapshot from the provided VM.
.. versionadded:: 2016.3.0
vm_name
The name of the VM from which to delete the snapshot.
snapshot_id
The ID of the snapshot to be deleted.
CLI Example:
.... | python | def vm_snapshot_delete(vm_name, kwargs=None, call=None):
'''
Deletes a virtual machine snapshot from the provided VM.
.. versionadded:: 2016.3.0
vm_name
The name of the VM from which to delete the snapshot.
snapshot_id
The ID of the snapshot to be deleted.
CLI Example:
.... | [
"def",
"vm_snapshot_delete",
"(",
"vm_name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_snapshot_delete action must be called with -a or --action.'",
")",
"if",
"... | Deletes a virtual machine snapshot from the provided VM.
.. versionadded:: 2016.3.0
vm_name
The name of the VM from which to delete the snapshot.
snapshot_id
The ID of the snapshot to be deleted.
CLI Example:
.. code-block:: bash
salt-cloud -a vm_snapshot_delete my-vm s... | [
"Deletes",
"a",
"virtual",
"machine",
"snapshot",
"from",
"the",
"provided",
"VM",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L3676-L3720 |
34,184 | saltstack/salt | salt/cloud/clouds/opennebula.py | vm_update | def vm_update(name, kwargs=None, call=None):
'''
Replaces the user template contents.
.. versionadded:: 2016.3.0
name
The name of the VM to update.
path
The path to a file containing new user template contents. Syntax within the
file can be the usual attribute=value or XML... | python | def vm_update(name, kwargs=None, call=None):
'''
Replaces the user template contents.
.. versionadded:: 2016.3.0
name
The name of the VM to update.
path
The path to a file containing new user template contents. Syntax within the
file can be the usual attribute=value or XML... | [
"def",
"vm_update",
"(",
"name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vm_update action must be called with -a or --action.'",
")",
"if",
"kwargs",
"is",
"N... | Replaces the user template contents.
.. versionadded:: 2016.3.0
name
The name of the VM to update.
path
The path to a file containing new user template contents. Syntax within the
file can be the usual attribute=value or XML. Can be used instead of ``data``.
data
Cont... | [
"Replaces",
"the",
"user",
"template",
"contents",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L3770-L3854 |
34,185 | saltstack/salt | salt/cloud/clouds/opennebula.py | vn_allocate | def vn_allocate(call=None, kwargs=None):
'''
Allocates a new virtual network in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file containing the template of the virtual network to allocate.
Syntax within the file can be the usual attribute=value or XML. Can be used
... | python | def vn_allocate(call=None, kwargs=None):
'''
Allocates a new virtual network in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file containing the template of the virtual network to allocate.
Syntax within the file can be the usual attribute=value or XML. Can be used
... | [
"def",
"vn_allocate",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vn_allocate function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
... | Allocates a new virtual network in OpenNebula.
.. versionadded:: 2016.3.0
path
The path to a file containing the template of the virtual network to allocate.
Syntax within the file can be the usual attribute=value or XML. Can be used
instead of ``data``.
data
Contains the ... | [
"Allocates",
"a",
"new",
"virtual",
"network",
"in",
"OpenNebula",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L3944-L4025 |
34,186 | saltstack/salt | salt/cloud/clouds/opennebula.py | vn_delete | def vn_delete(call=None, kwargs=None):
'''
Deletes the given virtual network from OpenNebula. Either a name or a vn_id must
be supplied.
.. versionadded:: 2016.3.0
name
The name of the virtual network to delete. Can be used instead of ``vn_id``.
vn_id
The ID of the virtual net... | python | def vn_delete(call=None, kwargs=None):
'''
Deletes the given virtual network from OpenNebula. Either a name or a vn_id must
be supplied.
.. versionadded:: 2016.3.0
name
The name of the virtual network to delete. Can be used instead of ``vn_id``.
vn_id
The ID of the virtual net... | [
"def",
"vn_delete",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vn_delete function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
":"... | Deletes the given virtual network from OpenNebula. Either a name or a vn_id must
be supplied.
.. versionadded:: 2016.3.0
name
The name of the virtual network to delete. Can be used instead of ``vn_id``.
vn_id
The ID of the virtual network to delete. Can be used instead of ``name``.
... | [
"Deletes",
"the",
"given",
"virtual",
"network",
"from",
"OpenNebula",
".",
"Either",
"a",
"name",
"or",
"a",
"vn_id",
"must",
"be",
"supplied",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L4028-L4084 |
34,187 | saltstack/salt | salt/cloud/clouds/opennebula.py | vn_free_ar | def vn_free_ar(call=None, kwargs=None):
'''
Frees a reserved address range from a virtual network.
.. versionadded:: 2016.3.0
vn_id
The ID of the virtual network from which to free an address range.
Can be used instead of ``vn_name``.
vn_name
The name of the virtual networ... | python | def vn_free_ar(call=None, kwargs=None):
'''
Frees a reserved address range from a virtual network.
.. versionadded:: 2016.3.0
vn_id
The ID of the virtual network from which to free an address range.
Can be used instead of ``vn_name``.
vn_name
The name of the virtual networ... | [
"def",
"vn_free_ar",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vn_free_ar function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
"... | Frees a reserved address range from a virtual network.
.. versionadded:: 2016.3.0
vn_id
The ID of the virtual network from which to free an address range.
Can be used instead of ``vn_name``.
vn_name
The name of the virtual network from which to free an address range.
Can b... | [
"Frees",
"a",
"reserved",
"address",
"range",
"from",
"a",
"virtual",
"network",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L4087-L4153 |
34,188 | saltstack/salt | salt/cloud/clouds/opennebula.py | vn_info | def vn_info(call=None, kwargs=None):
'''
Retrieves information for the virtual network.
.. versionadded:: 2016.3.0
name
The name of the virtual network for which to gather information. Can be
used instead of ``vn_id``.
vn_id
The ID of the virtual network for which to gathe... | python | def vn_info(call=None, kwargs=None):
'''
Retrieves information for the virtual network.
.. versionadded:: 2016.3.0
name
The name of the virtual network for which to gather information. Can be
used instead of ``vn_id``.
vn_id
The ID of the virtual network for which to gathe... | [
"def",
"vn_info",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vn_info function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
":",
... | Retrieves information for the virtual network.
.. versionadded:: 2016.3.0
name
The name of the virtual network for which to gather information. Can be
used instead of ``vn_id``.
vn_id
The ID of the virtual network for which to gather information. Can be
used instead of ``n... | [
"Retrieves",
"information",
"for",
"the",
"virtual",
"network",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L4242-L4298 |
34,189 | saltstack/salt | salt/cloud/clouds/opennebula.py | vn_release | def vn_release(call=None, kwargs=None):
'''
Releases a virtual network lease that was previously on hold.
.. versionadded:: 2016.3.0
vn_id
The ID of the virtual network from which to release the lease. Can be
used instead of ``vn_name``.
vn_name
The name of the virtual net... | python | def vn_release(call=None, kwargs=None):
'''
Releases a virtual network lease that was previously on hold.
.. versionadded:: 2016.3.0
vn_id
The ID of the virtual network from which to release the lease. Can be
used instead of ``vn_name``.
vn_name
The name of the virtual net... | [
"def",
"vn_release",
"(",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The vn_reserve function must be called with -f or --function.'",
")",
"if",
"kwargs",
"is",
"None",
"... | Releases a virtual network lease that was previously on hold.
.. versionadded:: 2016.3.0
vn_id
The ID of the virtual network from which to release the lease. Can be
used instead of ``vn_name``.
vn_name
The name of the virtual network from which to release the lease.
Can be... | [
"Releases",
"a",
"virtual",
"network",
"lease",
"that",
"was",
"previously",
"on",
"hold",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L4301-L4384 |
34,190 | saltstack/salt | salt/cloud/clouds/opennebula.py | _get_xml | def _get_xml(xml_str):
'''
Intrepret the data coming from opennebula and raise if it's not XML.
'''
try:
xml_data = etree.XML(xml_str)
# XMLSyntaxError seems to be only available from lxml, but that is the xml
# library loaded by this module
except etree.XMLSyntaxError as err:
... | python | def _get_xml(xml_str):
'''
Intrepret the data coming from opennebula and raise if it's not XML.
'''
try:
xml_data = etree.XML(xml_str)
# XMLSyntaxError seems to be only available from lxml, but that is the xml
# library loaded by this module
except etree.XMLSyntaxError as err:
... | [
"def",
"_get_xml",
"(",
"xml_str",
")",
":",
"try",
":",
"xml_data",
"=",
"etree",
".",
"XML",
"(",
"xml_str",
")",
"# XMLSyntaxError seems to be only available from lxml, but that is the xml",
"# library loaded by this module",
"except",
"etree",
".",
"XMLSyntaxError",
"... | Intrepret the data coming from opennebula and raise if it's not XML. | [
"Intrepret",
"the",
"data",
"coming",
"from",
"opennebula",
"and",
"raise",
"if",
"it",
"s",
"not",
"XML",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L4500-L4512 |
34,191 | saltstack/salt | salt/cloud/clouds/opennebula.py | _get_xml_rpc | def _get_xml_rpc():
'''
Uses the OpenNebula cloud provider configurations to connect to the
OpenNebula API.
Returns the server connection created as well as the user and password
values from the cloud provider config file used to make the connection.
'''
vm_ = get_configured_provider()
... | python | def _get_xml_rpc():
'''
Uses the OpenNebula cloud provider configurations to connect to the
OpenNebula API.
Returns the server connection created as well as the user and password
values from the cloud provider config file used to make the connection.
'''
vm_ = get_configured_provider()
... | [
"def",
"_get_xml_rpc",
"(",
")",
":",
"vm_",
"=",
"get_configured_provider",
"(",
")",
"xml_rpc",
"=",
"config",
".",
"get_cloud_config_value",
"(",
"'xml_rpc'",
",",
"vm_",
",",
"__opts__",
",",
"search_global",
"=",
"False",
")",
"user",
"=",
"config",
"."... | Uses the OpenNebula cloud provider configurations to connect to the
OpenNebula API.
Returns the server connection created as well as the user and password
values from the cloud provider config file used to make the connection. | [
"Uses",
"the",
"OpenNebula",
"cloud",
"provider",
"configurations",
"to",
"connect",
"to",
"the",
"OpenNebula",
"API",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L4515-L4539 |
34,192 | saltstack/salt | salt/cloud/clouds/opennebula.py | _xml_to_dict | def _xml_to_dict(xml):
'''
Helper function to covert xml into a data dictionary.
xml
The xml data to convert.
'''
dicts = {}
for item in xml:
key = item.tag.lower()
idx = 1
while key in dicts:
key += six.text_type(idx)
idx += 1
if ... | python | def _xml_to_dict(xml):
'''
Helper function to covert xml into a data dictionary.
xml
The xml data to convert.
'''
dicts = {}
for item in xml:
key = item.tag.lower()
idx = 1
while key in dicts:
key += six.text_type(idx)
idx += 1
if ... | [
"def",
"_xml_to_dict",
"(",
"xml",
")",
":",
"dicts",
"=",
"{",
"}",
"for",
"item",
"in",
"xml",
":",
"key",
"=",
"item",
".",
"tag",
".",
"lower",
"(",
")",
"idx",
"=",
"1",
"while",
"key",
"in",
"dicts",
":",
"key",
"+=",
"six",
".",
"text_ty... | Helper function to covert xml into a data dictionary.
xml
The xml data to convert. | [
"Helper",
"function",
"to",
"covert",
"xml",
"into",
"a",
"data",
"dictionary",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/opennebula.py#L4586-L4605 |
34,193 | saltstack/salt | salt/modules/config.py | option | def option(
value,
default='',
omit_opts=False,
omit_master=False,
omit_pillar=False):
'''
Pass in a generic option and receive the value that will be assigned
CLI Example:
.. code-block:: bash
salt '*' config.option redis.host
'''
if not omit_o... | python | def option(
value,
default='',
omit_opts=False,
omit_master=False,
omit_pillar=False):
'''
Pass in a generic option and receive the value that will be assigned
CLI Example:
.. code-block:: bash
salt '*' config.option redis.host
'''
if not omit_o... | [
"def",
"option",
"(",
"value",
",",
"default",
"=",
"''",
",",
"omit_opts",
"=",
"False",
",",
"omit_master",
"=",
"False",
",",
"omit_pillar",
"=",
"False",
")",
":",
"if",
"not",
"omit_opts",
":",
"if",
"value",
"in",
"__opts__",
":",
"return",
"__op... | Pass in a generic option and receive the value that will be assigned
CLI Example:
.. code-block:: bash
salt '*' config.option redis.host | [
"Pass",
"in",
"a",
"generic",
"option",
"and",
"receive",
"the",
"value",
"that",
"will",
"be",
"assigned"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/config.py#L131-L157 |
34,194 | saltstack/salt | salt/modules/config.py | gather_bootstrap_script | def gather_bootstrap_script(bootstrap=None):
'''
Download the salt-bootstrap script, and return its location
bootstrap
URL of alternate bootstrap script
CLI Example:
.. code-block:: bash
salt '*' config.gather_bootstrap_script
'''
if not HAS_CLOUD:
return False, '... | python | def gather_bootstrap_script(bootstrap=None):
'''
Download the salt-bootstrap script, and return its location
bootstrap
URL of alternate bootstrap script
CLI Example:
.. code-block:: bash
salt '*' config.gather_bootstrap_script
'''
if not HAS_CLOUD:
return False, '... | [
"def",
"gather_bootstrap_script",
"(",
"bootstrap",
"=",
"None",
")",
":",
"if",
"not",
"HAS_CLOUD",
":",
"return",
"False",
",",
"'config.gather_bootstrap_script is unavailable'",
"ret",
"=",
"salt",
".",
"utils",
".",
"cloud",
".",
"update_bootstrap",
"(",
"__op... | Download the salt-bootstrap script, and return its location
bootstrap
URL of alternate bootstrap script
CLI Example:
.. code-block:: bash
salt '*' config.gather_bootstrap_script | [
"Download",
"the",
"salt",
"-",
"bootstrap",
"script",
"and",
"return",
"its",
"location"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/config.py#L446-L463 |
34,195 | saltstack/salt | salt/states/panos.py | _build_members | def _build_members(members, anycheck=False):
'''
Builds a member formatted string for XML operation.
'''
if isinstance(members, list):
# This check will strip down members to a single any statement
if anycheck and 'any' in members:
return "<member>any</member>"
resp... | python | def _build_members(members, anycheck=False):
'''
Builds a member formatted string for XML operation.
'''
if isinstance(members, list):
# This check will strip down members to a single any statement
if anycheck and 'any' in members:
return "<member>any</member>"
resp... | [
"def",
"_build_members",
"(",
"members",
",",
"anycheck",
"=",
"False",
")",
":",
"if",
"isinstance",
"(",
"members",
",",
"list",
")",
":",
"# This check will strip down members to a single any statement",
"if",
"anycheck",
"and",
"'any'",
"in",
"members",
":",
"... | Builds a member formatted string for XML operation. | [
"Builds",
"a",
"member",
"formatted",
"string",
"for",
"XML",
"operation",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/panos.py#L101-L116 |
34,196 | saltstack/salt | salt/states/panos.py | _edit_config | def _edit_config(xpath, element):
'''
Sends an edit request to the device.
'''
query = {'type': 'config',
'action': 'edit',
'xpath': xpath,
'element': element}
response = __proxy__['panos.call'](query)
return _validate_response(response) | python | def _edit_config(xpath, element):
'''
Sends an edit request to the device.
'''
query = {'type': 'config',
'action': 'edit',
'xpath': xpath,
'element': element}
response = __proxy__['panos.call'](query)
return _validate_response(response) | [
"def",
"_edit_config",
"(",
"xpath",
",",
"element",
")",
":",
"query",
"=",
"{",
"'type'",
":",
"'config'",
",",
"'action'",
":",
"'edit'",
",",
"'xpath'",
":",
"xpath",
",",
"'element'",
":",
"element",
"}",
"response",
"=",
"__proxy__",
"[",
"'panos.c... | Sends an edit request to the device. | [
"Sends",
"an",
"edit",
"request",
"to",
"the",
"device",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/panos.py#L134-L146 |
34,197 | saltstack/salt | salt/states/panos.py | _move_after | def _move_after(xpath, target):
'''
Moves an xpath to the after of its section.
'''
query = {'type': 'config',
'action': 'move',
'xpath': xpath,
'where': 'after',
'dst': target}
response = __proxy__['panos.call'](query)
return _validate_resp... | python | def _move_after(xpath, target):
'''
Moves an xpath to the after of its section.
'''
query = {'type': 'config',
'action': 'move',
'xpath': xpath,
'where': 'after',
'dst': target}
response = __proxy__['panos.call'](query)
return _validate_resp... | [
"def",
"_move_after",
"(",
"xpath",
",",
"target",
")",
":",
"query",
"=",
"{",
"'type'",
":",
"'config'",
",",
"'action'",
":",
"'move'",
",",
"'xpath'",
":",
"xpath",
",",
"'where'",
":",
"'after'",
",",
"'dst'",
":",
"target",
"}",
"response",
"=",
... | Moves an xpath to the after of its section. | [
"Moves",
"an",
"xpath",
"to",
"the",
"after",
"of",
"its",
"section",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/panos.py#L163-L176 |
34,198 | saltstack/salt | salt/states/panos.py | _move_before | def _move_before(xpath, target):
'''
Moves an xpath to the bottom of its section.
'''
query = {'type': 'config',
'action': 'move',
'xpath': xpath,
'where': 'before',
'dst': target}
response = __proxy__['panos.call'](query)
return _validate_r... | python | def _move_before(xpath, target):
'''
Moves an xpath to the bottom of its section.
'''
query = {'type': 'config',
'action': 'move',
'xpath': xpath,
'where': 'before',
'dst': target}
response = __proxy__['panos.call'](query)
return _validate_r... | [
"def",
"_move_before",
"(",
"xpath",
",",
"target",
")",
":",
"query",
"=",
"{",
"'type'",
":",
"'config'",
",",
"'action'",
":",
"'move'",
",",
"'xpath'",
":",
"xpath",
",",
"'where'",
":",
"'before'",
",",
"'dst'",
":",
"target",
"}",
"response",
"="... | Moves an xpath to the bottom of its section. | [
"Moves",
"an",
"xpath",
"to",
"the",
"bottom",
"of",
"its",
"section",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/panos.py#L179-L192 |
34,199 | saltstack/salt | salt/states/panos.py | _set_config | def _set_config(xpath, element):
'''
Sends a set request to the device.
'''
query = {'type': 'config',
'action': 'set',
'xpath': xpath,
'element': element}
response = __proxy__['panos.call'](query)
return _validate_response(response) | python | def _set_config(xpath, element):
'''
Sends a set request to the device.
'''
query = {'type': 'config',
'action': 'set',
'xpath': xpath,
'element': element}
response = __proxy__['panos.call'](query)
return _validate_response(response) | [
"def",
"_set_config",
"(",
"xpath",
",",
"element",
")",
":",
"query",
"=",
"{",
"'type'",
":",
"'config'",
",",
"'action'",
":",
"'set'",
",",
"'xpath'",
":",
"xpath",
",",
"'element'",
":",
"element",
"}",
"response",
"=",
"__proxy__",
"[",
"'panos.cal... | Sends a set request to the device. | [
"Sends",
"a",
"set",
"request",
"to",
"the",
"device",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/panos.py#L225-L237 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.