body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
e8d382de35d39e1ed04ec7f15c01b7eda72451910c6c4708831f36b89d3e270a
@environment.setter def environment(self, environment): 'Sets the environment of this V1KFReplica.\n\n\n :param environment: The environment of this V1KFReplica. # noqa: E501\n :type environment: V1Environment\n ' self._environment = environment
Sets the environment of this V1KFReplica. :param environment: The environment of this V1KFReplica. # noqa: E501 :type environment: V1Environment
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
environment
polyaxon/polyaxon-client
13
python
@environment.setter def environment(self, environment): 'Sets the environment of this V1KFReplica.\n\n\n :param environment: The environment of this V1KFReplica. # noqa: E501\n :type environment: V1Environment\n ' self._environment = environment
@environment.setter def environment(self, environment): 'Sets the environment of this V1KFReplica.\n\n\n :param environment: The environment of this V1KFReplica. # noqa: E501\n :type environment: V1Environment\n ' self._environment = environment<|docstring|>Sets the environment of this V1K...
50a36c97a0ef600c986ab7f50e438dc13c3236fd1c586bc6d5ff1ea246837209
@property def connections(self): 'Gets the connections of this V1KFReplica. # noqa: E501\n\n\n :return: The connections of this V1KFReplica. # noqa: E501\n :rtype: list[str]\n ' return self._connections
Gets the connections of this V1KFReplica. # noqa: E501 :return: The connections of this V1KFReplica. # noqa: E501 :rtype: list[str]
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
connections
polyaxon/polyaxon-client
13
python
@property def connections(self): 'Gets the connections of this V1KFReplica. # noqa: E501\n\n\n :return: The connections of this V1KFReplica. # noqa: E501\n :rtype: list[str]\n ' return self._connections
@property def connections(self): 'Gets the connections of this V1KFReplica. # noqa: E501\n\n\n :return: The connections of this V1KFReplica. # noqa: E501\n :rtype: list[str]\n ' return self._connections<|docstring|>Gets the connections of this V1KFReplica. # noqa: E501 :return: The con...
11c4c13ea18934f3b2f754b40b2aeaf3b430ce18016a70e314061b81357a8c55
@connections.setter def connections(self, connections): 'Sets the connections of this V1KFReplica.\n\n\n :param connections: The connections of this V1KFReplica. # noqa: E501\n :type connections: list[str]\n ' self._connections = connections
Sets the connections of this V1KFReplica. :param connections: The connections of this V1KFReplica. # noqa: E501 :type connections: list[str]
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
connections
polyaxon/polyaxon-client
13
python
@connections.setter def connections(self, connections): 'Sets the connections of this V1KFReplica.\n\n\n :param connections: The connections of this V1KFReplica. # noqa: E501\n :type connections: list[str]\n ' self._connections = connections
@connections.setter def connections(self, connections): 'Sets the connections of this V1KFReplica.\n\n\n :param connections: The connections of this V1KFReplica. # noqa: E501\n :type connections: list[str]\n ' self._connections = connections<|docstring|>Sets the connections of this V1KFRep...
71c9f1fc16c703d5a86ecd491a2d5e57bc00676d44e7fea2727ca7516ebf66b6
@property def volumes(self): 'Gets the volumes of this V1KFReplica. # noqa: E501\n\n\n :return: The volumes of this V1KFReplica. # noqa: E501\n :rtype: list[V1Volume]\n ' return self._volumes
Gets the volumes of this V1KFReplica. # noqa: E501 :return: The volumes of this V1KFReplica. # noqa: E501 :rtype: list[V1Volume]
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
volumes
polyaxon/polyaxon-client
13
python
@property def volumes(self): 'Gets the volumes of this V1KFReplica. # noqa: E501\n\n\n :return: The volumes of this V1KFReplica. # noqa: E501\n :rtype: list[V1Volume]\n ' return self._volumes
@property def volumes(self): 'Gets the volumes of this V1KFReplica. # noqa: E501\n\n\n :return: The volumes of this V1KFReplica. # noqa: E501\n :rtype: list[V1Volume]\n ' return self._volumes<|docstring|>Gets the volumes of this V1KFReplica. # noqa: E501 :return: The volumes of this V1...
7d5cad2ff2b200c96f975a2610046176a0deffb08484cb12d92fe82b7e10daf0
@volumes.setter def volumes(self, volumes): 'Sets the volumes of this V1KFReplica.\n\n\n :param volumes: The volumes of this V1KFReplica. # noqa: E501\n :type volumes: list[V1Volume]\n ' self._volumes = volumes
Sets the volumes of this V1KFReplica. :param volumes: The volumes of this V1KFReplica. # noqa: E501 :type volumes: list[V1Volume]
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
volumes
polyaxon/polyaxon-client
13
python
@volumes.setter def volumes(self, volumes): 'Sets the volumes of this V1KFReplica.\n\n\n :param volumes: The volumes of this V1KFReplica. # noqa: E501\n :type volumes: list[V1Volume]\n ' self._volumes = volumes
@volumes.setter def volumes(self, volumes): 'Sets the volumes of this V1KFReplica.\n\n\n :param volumes: The volumes of this V1KFReplica. # noqa: E501\n :type volumes: list[V1Volume]\n ' self._volumes = volumes<|docstring|>Sets the volumes of this V1KFReplica. :param volumes: The volumes...
97d537552634bd312cfbb345a861f1e1f327689ea2c51d4aa5a18254ed60f1ca
@property def init(self): 'Gets the init of this V1KFReplica. # noqa: E501\n\n\n :return: The init of this V1KFReplica. # noqa: E501\n :rtype: list[V1Init]\n ' return self._init
Gets the init of this V1KFReplica. # noqa: E501 :return: The init of this V1KFReplica. # noqa: E501 :rtype: list[V1Init]
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
init
polyaxon/polyaxon-client
13
python
@property def init(self): 'Gets the init of this V1KFReplica. # noqa: E501\n\n\n :return: The init of this V1KFReplica. # noqa: E501\n :rtype: list[V1Init]\n ' return self._init
@property def init(self): 'Gets the init of this V1KFReplica. # noqa: E501\n\n\n :return: The init of this V1KFReplica. # noqa: E501\n :rtype: list[V1Init]\n ' return self._init<|docstring|>Gets the init of this V1KFReplica. # noqa: E501 :return: The init of this V1KFReplica. # noqa: ...
1e289d4f26bcc4bbbb931eaec45f5e634afa2243ef9ae40689d8e44adb5163b9
@init.setter def init(self, init): 'Sets the init of this V1KFReplica.\n\n\n :param init: The init of this V1KFReplica. # noqa: E501\n :type init: list[V1Init]\n ' self._init = init
Sets the init of this V1KFReplica. :param init: The init of this V1KFReplica. # noqa: E501 :type init: list[V1Init]
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
init
polyaxon/polyaxon-client
13
python
@init.setter def init(self, init): 'Sets the init of this V1KFReplica.\n\n\n :param init: The init of this V1KFReplica. # noqa: E501\n :type init: list[V1Init]\n ' self._init = init
@init.setter def init(self, init): 'Sets the init of this V1KFReplica.\n\n\n :param init: The init of this V1KFReplica. # noqa: E501\n :type init: list[V1Init]\n ' self._init = init<|docstring|>Sets the init of this V1KFReplica. :param init: The init of this V1KFReplica. # noqa: E501 :t...
5f05b398fa15c96554c5f46c5d0ba04a024da763f0a00d9633bbe1cec4078c16
@property def sidecars(self): 'Gets the sidecars of this V1KFReplica. # noqa: E501\n\n\n :return: The sidecars of this V1KFReplica. # noqa: E501\n :rtype: list[V1Container]\n ' return self._sidecars
Gets the sidecars of this V1KFReplica. # noqa: E501 :return: The sidecars of this V1KFReplica. # noqa: E501 :rtype: list[V1Container]
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
sidecars
polyaxon/polyaxon-client
13
python
@property def sidecars(self): 'Gets the sidecars of this V1KFReplica. # noqa: E501\n\n\n :return: The sidecars of this V1KFReplica. # noqa: E501\n :rtype: list[V1Container]\n ' return self._sidecars
@property def sidecars(self): 'Gets the sidecars of this V1KFReplica. # noqa: E501\n\n\n :return: The sidecars of this V1KFReplica. # noqa: E501\n :rtype: list[V1Container]\n ' return self._sidecars<|docstring|>Gets the sidecars of this V1KFReplica. # noqa: E501 :return: The sidecars o...
3d7dd041ed59abf368db127e4fbcedc14263839f2448987d49871a5b47350d27
@sidecars.setter def sidecars(self, sidecars): 'Sets the sidecars of this V1KFReplica.\n\n\n :param sidecars: The sidecars of this V1KFReplica. # noqa: E501\n :type sidecars: list[V1Container]\n ' self._sidecars = sidecars
Sets the sidecars of this V1KFReplica. :param sidecars: The sidecars of this V1KFReplica. # noqa: E501 :type sidecars: list[V1Container]
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
sidecars
polyaxon/polyaxon-client
13
python
@sidecars.setter def sidecars(self, sidecars): 'Sets the sidecars of this V1KFReplica.\n\n\n :param sidecars: The sidecars of this V1KFReplica. # noqa: E501\n :type sidecars: list[V1Container]\n ' self._sidecars = sidecars
@sidecars.setter def sidecars(self, sidecars): 'Sets the sidecars of this V1KFReplica.\n\n\n :param sidecars: The sidecars of this V1KFReplica. # noqa: E501\n :type sidecars: list[V1Container]\n ' self._sidecars = sidecars<|docstring|>Sets the sidecars of this V1KFReplica. :param sidecar...
392c7d8fd682ea838b7e7087b186ecaf39647c53b09ec1e43497f6648b87a89e
@property def container(self): 'Gets the container of this V1KFReplica. # noqa: E501\n\n\n :return: The container of this V1KFReplica. # noqa: E501\n :rtype: V1Container\n ' return self._container
Gets the container of this V1KFReplica. # noqa: E501 :return: The container of this V1KFReplica. # noqa: E501 :rtype: V1Container
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
container
polyaxon/polyaxon-client
13
python
@property def container(self): 'Gets the container of this V1KFReplica. # noqa: E501\n\n\n :return: The container of this V1KFReplica. # noqa: E501\n :rtype: V1Container\n ' return self._container
@property def container(self): 'Gets the container of this V1KFReplica. # noqa: E501\n\n\n :return: The container of this V1KFReplica. # noqa: E501\n :rtype: V1Container\n ' return self._container<|docstring|>Gets the container of this V1KFReplica. # noqa: E501 :return: The container o...
47983a13f7a8be2ce3a3489ff6ea0bf3c6fdda05f399298aa6c4ef64015449de
@container.setter def container(self, container): 'Sets the container of this V1KFReplica.\n\n\n :param container: The container of this V1KFReplica. # noqa: E501\n :type container: V1Container\n ' self._container = container
Sets the container of this V1KFReplica. :param container: The container of this V1KFReplica. # noqa: E501 :type container: V1Container
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
container
polyaxon/polyaxon-client
13
python
@container.setter def container(self, container): 'Sets the container of this V1KFReplica.\n\n\n :param container: The container of this V1KFReplica. # noqa: E501\n :type container: V1Container\n ' self._container = container
@container.setter def container(self, container): 'Sets the container of this V1KFReplica.\n\n\n :param container: The container of this V1KFReplica. # noqa: E501\n :type container: V1Container\n ' self._container = container<|docstring|>Sets the container of this V1KFReplica. :param con...
eac645eb3fed416aa3cbf5116a0cf9e44cd06b29a875d0af1efcfac28b9a6f29
def to_dict(self, serialize=False): 'Returns the model properties as a dict' result = {} def convert(x): if hasattr(x, 'to_dict'): args = getfullargspec(x.to_dict).args if (len(args) == 1): return x.to_dict() else: return x.to_dict...
Returns the model properties as a dict
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
to_dict
polyaxon/polyaxon-client
13
python
def to_dict(self, serialize=False): result = {} def convert(x): if hasattr(x, 'to_dict'): args = getfullargspec(x.to_dict).args if (len(args) == 1): return x.to_dict() else: return x.to_dict(serialize) else: re...
def to_dict(self, serialize=False): result = {} def convert(x): if hasattr(x, 'to_dict'): args = getfullargspec(x.to_dict).args if (len(args) == 1): return x.to_dict() else: return x.to_dict(serialize) else: re...
cbb19eaa2fc8a113d9e32f924ef280a7e97563f8915f94f65dab438997af2e99
def to_str(self): 'Returns the string representation of the model' return pprint.pformat(self.to_dict())
Returns the string representation of the model
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
to_str
polyaxon/polyaxon-client
13
python
def to_str(self): return pprint.pformat(self.to_dict())
def to_str(self): return pprint.pformat(self.to_dict())<|docstring|>Returns the string representation of the model<|endoftext|>
772243a2c2b3261a9b954d07aaf295e3c1242a579a495e2d6a5679c677861703
def __repr__(self): 'For `print` and `pprint`' return self.to_str()
For `print` and `pprint`
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
__repr__
polyaxon/polyaxon-client
13
python
def __repr__(self): return self.to_str()
def __repr__(self): return self.to_str()<|docstring|>For `print` and `pprint`<|endoftext|>
c16db1d6aca4303942947951812f5e774f9750dbc930608a7a62db3f4a49d5ba
def __eq__(self, other): 'Returns true if both objects are equal' if (not isinstance(other, V1KFReplica)): return False return (self.to_dict() == other.to_dict())
Returns true if both objects are equal
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
__eq__
polyaxon/polyaxon-client
13
python
def __eq__(self, other): if (not isinstance(other, V1KFReplica)): return False return (self.to_dict() == other.to_dict())
def __eq__(self, other): if (not isinstance(other, V1KFReplica)): return False return (self.to_dict() == other.to_dict())<|docstring|>Returns true if both objects are equal<|endoftext|>
57e9a69127b99a53fa796df18948fe98530b69a8d2ff5b6922695a46466fdee4
def __ne__(self, other): 'Returns true if both objects are not equal' if (not isinstance(other, V1KFReplica)): return True return (self.to_dict() != other.to_dict())
Returns true if both objects are not equal
python/http_client/v1/polyaxon_sdk/models/v1_kf_replica.py
__ne__
polyaxon/polyaxon-client
13
python
def __ne__(self, other): if (not isinstance(other, V1KFReplica)): return True return (self.to_dict() != other.to_dict())
def __ne__(self, other): if (not isinstance(other, V1KFReplica)): return True return (self.to_dict() != other.to_dict())<|docstring|>Returns true if both objects are not equal<|endoftext|>
92812f10ccc141aad07dde99e74066dbcd2a95305848d8a57d16325c1b08ff2d
def parse_results_page(content): '\n parse the entire html page content, \n to extract list of fixtures that have a match score\n ' soup = bs4.BeautifulSoup(content, 'html.parser') match_results = soup.select('ul li.match-result') results = [] for result in match_results: try: ...
parse the entire html page content, to extract list of fixtures that have a match score
external/lfp_results.py
parse_results_page
dmartin35/pronosfoot
4
python
def parse_results_page(content): '\n parse the entire html page content, \n to extract list of fixtures that have a match score\n ' soup = bs4.BeautifulSoup(content, 'html.parser') match_results = soup.select('ul li.match-result') results = [] for result in match_results: try: ...
def parse_results_page(content): '\n parse the entire html page content, \n to extract list of fixtures that have a match score\n ' soup = bs4.BeautifulSoup(content, 'html.parser') match_results = soup.select('ul li.match-result') results = [] for result in match_results: try: ...
7f34446866e0ac14c9317a06b346d1103590fc5ccef34501199e0c2e78f4e7d9
def choose_artist(self, information): '\n if artist exist\n if cover by take following\n if search\n\n :param information:\n :return:\n ' if (('artist' in information) and (information['artist'] is not None)): return information['artist'] elif self.is_title_...
if artist exist if cover by take following if search :param information: :return:
media/downloader.py
choose_artist
ThibF/G-youmus
0
python
def choose_artist(self, information): '\n if artist exist\n if cover by take following\n if search\n\n :param information:\n :return:\n ' if (('artist' in information) and (information['artist'] is not None)): return information['artist'] elif self.is_title_...
def choose_artist(self, information): '\n if artist exist\n if cover by take following\n if search\n\n :param information:\n :return:\n ' if (('artist' in information) and (information['artist'] is not None)): return information['artist'] elif self.is_title_...
c3b2ecde7ba1292f9f6984c361887463db6e3e172bd1e9cf8f597bd5b73ef2e5
def test_run(self): "Doesn't really check much, but a simple integration sanity test" test_loop_count = 5 os.environ.update({'MAILGUN_API_KEY': 'test-mg-key', 'AVAILABLE_NUMBER': '555-555-5050', 'MY_PHONE': '555-555-0505', 'ACCOUNT_SID': 'test-account-id', 'AUTH_TOKEN': 'test-account-token'}) args = '--...
Doesn't really check much, but a simple integration sanity test
tests/minitor_test.py
test_run
IamTheFij/minitor
39
python
def test_run(self): test_loop_count = 5 os.environ.update({'MAILGUN_API_KEY': 'test-mg-key', 'AVAILABLE_NUMBER': '555-555-5050', 'MY_PHONE': '555-555-0505', 'ACCOUNT_SID': 'test-account-id', 'AUTH_TOKEN': 'test-account-token'}) args = '--config ./sample-config.yml'.split(' ') minitor = Minitor() ...
def test_run(self): test_loop_count = 5 os.environ.update({'MAILGUN_API_KEY': 'test-mg-key', 'AVAILABLE_NUMBER': '555-555-5050', 'MY_PHONE': '555-555-0505', 'ACCOUNT_SID': 'test-account-id', 'AUTH_TOKEN': 'test-account-token'}) args = '--config ./sample-config.yml'.split(' ') minitor = Minitor() ...
130ef7e49dba0f1554e33656674a143e3ceb135d91e3ba31e3630ea113a65759
def voxelize(self, pts, voxel_size, extents=None, create_leaf_layout=True): '\n The input for the voxelization is expected to be a PointCloud\n with N points in 3 dimension (x,y,z). Voxel size is the quantization size\n for the voxel grid.\n\n :param pts: Point cloud as N x [x, y, z]\n ...
The input for the voxelization is expected to be a PointCloud with N points in 3 dimension (x,y,z). Voxel size is the quantization size for the voxel grid. :param pts: Point cloud as N x [x, y, z] :param voxel_size: Quantization size for the grid :param extents: Optional, specifies the full extents of the point cloud....
3_inference/code/src/utils/wavedata/wavedata/tools/core/voxel_grid.py
voxelize
Ascend-Huawei/AVOD
0
python
def voxelize(self, pts, voxel_size, extents=None, create_leaf_layout=True): '\n The input for the voxelization is expected to be a PointCloud\n with N points in 3 dimension (x,y,z). Voxel size is the quantization size\n for the voxel grid.\n\n :param pts: Point cloud as N x [x, y, z]\n ...
def voxelize(self, pts, voxel_size, extents=None, create_leaf_layout=True): '\n The input for the voxelization is expected to be a PointCloud\n with N points in 3 dimension (x,y,z). Voxel size is the quantization size\n for the voxel grid.\n\n :param pts: Point cloud as N x [x, y, z]\n ...
78d9219021a1ba79471f1572bdb365f012e39c6050c9e073957e12dc494c0b11
def map_to_index(self, map_index): ' convert map coordinate values to 1-based discrectized grid index coordinate\n Note: Any values outside the extent of the grid will be forced to be the maximum grid\n coordinate.\n\n :param map_index: N x 3 points\n\n :return: N x length(dim) (...
convert map coordinate values to 1-based discrectized grid index coordinate Note: Any values outside the extent of the grid will be forced to be the maximum grid coordinate. :param map_index: N x 3 points :return: N x length(dim) (grid coordinate) [] if min_voxel_coord or voxel_size or grid_index or d...
3_inference/code/src/utils/wavedata/wavedata/tools/core/voxel_grid.py
map_to_index
Ascend-Huawei/AVOD
0
python
def map_to_index(self, map_index): ' convert map coordinate values to 1-based discrectized grid index coordinate\n Note: Any values outside the extent of the grid will be forced to be the maximum grid\n coordinate.\n\n :param map_index: N x 3 points\n\n :return: N x length(dim) (...
def map_to_index(self, map_index): ' convert map coordinate values to 1-based discrectized grid index coordinate\n Note: Any values outside the extent of the grid will be forced to be the maximum grid\n coordinate.\n\n :param map_index: N x 3 points\n\n :return: N x length(dim) (...
2535c40e0b44ec551b42688e9e04c7a0758528bb00a96de403cf89f9b6a65fb5
def parse_args(): '\n Parse arguments.\n ' env = environment.Environment() parser = argparse.ArgumentParser() parser.add_argument('--max-depth', type=int, default=10) parser.add_argument('--n-jobs', type=int, default=env.num_cpus) parser.add_argument('--n-estimators', type=int, default=120...
Parse arguments.
sagemaker-script-mode/scikitlearn_script/train_deploy_scikitlearn_without_dependencies.py
parse_args
Amirosimani/amazon-sagemaker-examples
2,610
python
def parse_args(): '\n \n ' env = environment.Environment() parser = argparse.ArgumentParser() parser.add_argument('--max-depth', type=int, default=10) parser.add_argument('--n-jobs', type=int, default=env.num_cpus) parser.add_argument('--n-estimators', type=int, default=120) parser.add...
def parse_args(): '\n \n ' env = environment.Environment() parser = argparse.ArgumentParser() parser.add_argument('--max-depth', type=int, default=10) parser.add_argument('--n-jobs', type=int, default=env.num_cpus) parser.add_argument('--n-estimators', type=int, default=120) parser.add...
2f31eab18af8ec56b0461fa33343228657210ce6e894bef240f9914b5d0e0aed
def load_dataset(path): '\n Load entire dataset.\n ' files = [os.path.join(path, file) for file in os.listdir(path) if file.endswith('csv')] if (len(files) == 0): raise ValueError('Invalid # of files in dir: {}'.format(path)) raw_data = [pd.read_csv(file, sep=',', header=None) for file in ...
Load entire dataset.
sagemaker-script-mode/scikitlearn_script/train_deploy_scikitlearn_without_dependencies.py
load_dataset
Amirosimani/amazon-sagemaker-examples
2,610
python
def load_dataset(path): '\n \n ' files = [os.path.join(path, file) for file in os.listdir(path) if file.endswith('csv')] if (len(files) == 0): raise ValueError('Invalid # of files in dir: {}'.format(path)) raw_data = [pd.read_csv(file, sep=',', header=None) for file in files] data = pd...
def load_dataset(path): '\n \n ' files = [os.path.join(path, file) for file in os.listdir(path) if file.endswith('csv')] if (len(files) == 0): raise ValueError('Invalid # of files in dir: {}'.format(path)) raw_data = [pd.read_csv(file, sep=',', header=None) for file in files] data = pd...
6f621408d96d563a54513e72f5fff50bd137c1b0b12171cfcfdc7952b09ba18d
def start(args): '\n Train a Random Forest Regressor\n ' print('Training mode') try: (X_train, y_train) = load_dataset(args.train) (X_test, y_test) = load_dataset(args.test) hyperparameters = {'max_depth': args.max_depth, 'verbose': 1, 'n_jobs': args.n_jobs, 'n_estimators': arg...
Train a Random Forest Regressor
sagemaker-script-mode/scikitlearn_script/train_deploy_scikitlearn_without_dependencies.py
start
Amirosimani/amazon-sagemaker-examples
2,610
python
def start(args): '\n \n ' print('Training mode') try: (X_train, y_train) = load_dataset(args.train) (X_test, y_test) = load_dataset(args.test) hyperparameters = {'max_depth': args.max_depth, 'verbose': 1, 'n_jobs': args.n_jobs, 'n_estimators': args.n_estimators} print('...
def start(args): '\n \n ' print('Training mode') try: (X_train, y_train) = load_dataset(args.train) (X_test, y_test) = load_dataset(args.test) hyperparameters = {'max_depth': args.max_depth, 'verbose': 1, 'n_jobs': args.n_jobs, 'n_estimators': args.n_estimators} print('...
ec4d2f24eaa13a29d5dac3b00751c491dcab7d300ce244e4f63d6bc6b622745c
def model_fn(model_dir): '\n Deserialized and return fitted model\n\n Note that this should have the same name as the serialized model in the main method\n ' clf = joblib.load(os.path.join(model_dir, 'model.joblib')) return clf
Deserialized and return fitted model Note that this should have the same name as the serialized model in the main method
sagemaker-script-mode/scikitlearn_script/train_deploy_scikitlearn_without_dependencies.py
model_fn
Amirosimani/amazon-sagemaker-examples
2,610
python
def model_fn(model_dir): '\n Deserialized and return fitted model\n\n Note that this should have the same name as the serialized model in the main method\n ' clf = joblib.load(os.path.join(model_dir, 'model.joblib')) return clf
def model_fn(model_dir): '\n Deserialized and return fitted model\n\n Note that this should have the same name as the serialized model in the main method\n ' clf = joblib.load(os.path.join(model_dir, 'model.joblib')) return clf<|docstring|>Deserialized and return fitted model Note that this should...
fa3b4445beac0c0e64a605d0a410e5557a28f2d8122673cdfb556fcaa41b83ce
def __call__(self, params, *args, **kwargs): '\n :param params: a list of parameters\n :type params: an iterable of strings\n\n Do an optimization step for each param in params. If a given param has never been seen before,\n initialize an optimizer for it.\n ' for p in params:...
:param params: a list of parameters :type params: an iterable of strings Do an optimization step for each param in params. If a given param has never been seen before, initialize an optimizer for it.
pyro/optim/optim.py
__call__
ssameerr/pyro
0
python
def __call__(self, params, *args, **kwargs): '\n :param params: a list of parameters\n :type params: an iterable of strings\n\n Do an optimization step for each param in params. If a given param has never been seen before,\n initialize an optimizer for it.\n ' for p in params:...
def __call__(self, params, *args, **kwargs): '\n :param params: a list of parameters\n :type params: an iterable of strings\n\n Do an optimization step for each param in params. If a given param has never been seen before,\n initialize an optimizer for it.\n ' for p in params:...
902b422559296000a523844cb52ac1d9f1a6fe36a610c1cb55ef5fb0a79b7f89
def get_state(self): '\n Get state associated with all the optimizers in the form of a dictionary with\n key-value pairs (parameter name, optim state dicts)\n ' state_dict = {} for param in self.optim_objs: param_name = pyro.get_param_store().param_name(param) state_dict...
Get state associated with all the optimizers in the form of a dictionary with key-value pairs (parameter name, optim state dicts)
pyro/optim/optim.py
get_state
ssameerr/pyro
0
python
def get_state(self): '\n Get state associated with all the optimizers in the form of a dictionary with\n key-value pairs (parameter name, optim state dicts)\n ' state_dict = {} for param in self.optim_objs: param_name = pyro.get_param_store().param_name(param) state_dict...
def get_state(self): '\n Get state associated with all the optimizers in the form of a dictionary with\n key-value pairs (parameter name, optim state dicts)\n ' state_dict = {} for param in self.optim_objs: param_name = pyro.get_param_store().param_name(param) state_dict...
db75fef4a80262dad02f04c65647abcf127823ee99c29ac9c162a996bd22fe88
def set_state(self, state_dict): '\n Set the state associated with all the optimizers using the state obtained\n from a previous call to get_state()\n ' self._state_waiting_to_be_consumed = state_dict
Set the state associated with all the optimizers using the state obtained from a previous call to get_state()
pyro/optim/optim.py
set_state
ssameerr/pyro
0
python
def set_state(self, state_dict): '\n Set the state associated with all the optimizers using the state obtained\n from a previous call to get_state()\n ' self._state_waiting_to_be_consumed = state_dict
def set_state(self, state_dict): '\n Set the state associated with all the optimizers using the state obtained\n from a previous call to get_state()\n ' self._state_waiting_to_be_consumed = state_dict<|docstring|>Set the state associated with all the optimizers using the state obtained from...
8411ca4746013b10c45be768970119d1d01404eeeb0ef029e7cb6264422f4534
def save(self, filename): '\n :param filename: file name to save to\n :type name: str\n\n Save optimizer state to disk\n ' with open(filename, 'wb') as output_file: output_file.write(cloudpickle.dumps(self.get_state()))
:param filename: file name to save to :type name: str Save optimizer state to disk
pyro/optim/optim.py
save
ssameerr/pyro
0
python
def save(self, filename): '\n :param filename: file name to save to\n :type name: str\n\n Save optimizer state to disk\n ' with open(filename, 'wb') as output_file: output_file.write(cloudpickle.dumps(self.get_state()))
def save(self, filename): '\n :param filename: file name to save to\n :type name: str\n\n Save optimizer state to disk\n ' with open(filename, 'wb') as output_file: output_file.write(cloudpickle.dumps(self.get_state()))<|docstring|>:param filename: file name to save to :type ...
376d05af826164e5ab4bf6ffa44ace2e25d3a583d6825a8c56a60ba14ce236f6
def load(self, filename): '\n :param filename: file name to load from\n :type name: str\n\n Load optimizer state from disk\n ' with open(filename, 'rb') as input_file: state = cloudpickle.loads(input_file.read()) self.set_state(state)
:param filename: file name to load from :type name: str Load optimizer state from disk
pyro/optim/optim.py
load
ssameerr/pyro
0
python
def load(self, filename): '\n :param filename: file name to load from\n :type name: str\n\n Load optimizer state from disk\n ' with open(filename, 'rb') as input_file: state = cloudpickle.loads(input_file.read()) self.set_state(state)
def load(self, filename): '\n :param filename: file name to load from\n :type name: str\n\n Load optimizer state from disk\n ' with open(filename, 'rb') as input_file: state = cloudpickle.loads(input_file.read()) self.set_state(state)<|docstring|>:param filename: file nam...
888dfa908ede5083006f294e60f7db0518c3badd7dcc5a9b68b52fbae29cdda8
def test_requires_submission_perm_no_submission(database, test_app): 'If no submission exists, we should see an exception' sub = SubmissionFactory(user=UserFactory()) database.session.add(sub) database.session.commit() g.user = sub.user fn = permissions.requires_submission_perms('writer')(Mock()...
If no submission exists, we should see an exception
tests/unit/dataactbroker/test_permissions.py
test_requires_submission_perm_no_submission
broker-fork/data-act-broker-backend
1
python
def test_requires_submission_perm_no_submission(database, test_app): sub = SubmissionFactory(user=UserFactory()) database.session.add(sub) database.session.commit() g.user = sub.user fn = permissions.requires_submission_perms('writer')(Mock()) fn(sub.submission_id) with pytest.raises(Re...
def test_requires_submission_perm_no_submission(database, test_app): sub = SubmissionFactory(user=UserFactory()) database.session.add(sub) database.session.commit() g.user = sub.user fn = permissions.requires_submission_perms('writer')(Mock()) fn(sub.submission_id) with pytest.raises(Re...
77a7ee5e60a168e4bd123d307f7d5410bb2ae29f03e8e7e949509e357949f387
def __call__(cls, *args, **kwargs): ' Returns singleton instance. A thread safe implementation. ' if (cls not in cls.__instances): with cls.__lock: if (cls not in cls.__instances): cls.__instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls.__instanc...
Returns singleton instance. A thread safe implementation.
nemo/utils/metaclasses.py
__call__
qmpzzpmq/NeMo
4,145
python
def __call__(cls, *args, **kwargs): ' ' if (cls not in cls.__instances): with cls.__lock: if (cls not in cls.__instances): cls.__instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls.__instances[cls]
def __call__(cls, *args, **kwargs): ' ' if (cls not in cls.__instances): with cls.__lock: if (cls not in cls.__instances): cls.__instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls.__instances[cls]<|docstring|>Returns singleton instance. A thread ...
3536529d86f2441f5f355eca92d2a576057426b0c157107c0e84ad99ee7a5c17
def as_chunks(arr, n): '\n\tYield successive n-sized chunks from arr.\n\t' assert (n >= 1) for i in range(0, len(arr), n): (yield arr[i:(i + n)])
Yield successive n-sized chunks from arr.
notalib/array.py
as_chunks
m1kc/pyutil
0
python
def as_chunks(arr, n): '\n\t\n\t' assert (n >= 1) for i in range(0, len(arr), n): (yield arr[i:(i + n)])
def as_chunks(arr, n): '\n\t\n\t' assert (n >= 1) for i in range(0, len(arr), n): (yield arr[i:(i + n)])<|docstring|>Yield successive n-sized chunks from arr.<|endoftext|>
b959aceeea5bd6a7bf9a475d58d33f54d5def33452992f99978b47c71edd4950
@classmethod def notify(cls, *args, **kwargs): '\n Notification dispatcher that calls platform specific method\n ' argparser = kwargs.get('argparser', '') track = kwargs.get('track', '') if (not (track and argparser and argparser.osd)): return artist = track.split(' - ')[0] ...
Notification dispatcher that calls platform specific method
voiceplay/player/hooks/osd.py
notify
tb0hdan/voiceplay
2
python
@classmethod def notify(cls, *args, **kwargs): '\n \n ' argparser = kwargs.get('argparser', ) track = kwargs.get('track', ) if (not (track and argparser and argparser.osd)): return artist = track.split(' - ')[0] album_art = AlbumArt() icon = album_art.get(artist) if...
@classmethod def notify(cls, *args, **kwargs): '\n \n ' argparser = kwargs.get('argparser', ) track = kwargs.get('track', ) if (not (track and argparser and argparser.osd)): return artist = track.split(' - ')[0] album_art = AlbumArt() icon = album_art.get(artist) if...
a355ecf89eae69521556caebc18845c74187e617ed6dbfe819125ad645b83d66
@classmethod def linux_notify(cls, message, icon): '\n Linux OSD using GI\n ' from gi.repository import Notify if (not os.environ.get('DISPLAY')): os.environ['DISPLAY'] = ':0.0' Notify.init(__title__) icon_file = mkstemp()[1] with open(icon_file, 'wb') as fh: fh.wri...
Linux OSD using GI
voiceplay/player/hooks/osd.py
linux_notify
tb0hdan/voiceplay
2
python
@classmethod def linux_notify(cls, message, icon): '\n \n ' from gi.repository import Notify if (not os.environ.get('DISPLAY')): os.environ['DISPLAY'] = ':0.0' Notify.init(__title__) icon_file = mkstemp()[1] with open(icon_file, 'wb') as fh: fh.write(icon) n = N...
@classmethod def linux_notify(cls, message, icon): '\n \n ' from gi.repository import Notify if (not os.environ.get('DISPLAY')): os.environ['DISPLAY'] = ':0.0' Notify.init(__title__) icon_file = mkstemp()[1] with open(icon_file, 'wb') as fh: fh.write(icon) n = N...
22058fdc857f8ec76cc91597facad5c4305510edc09eadb20afee5760e41b737
@classmethod def darwin_notify(cls, message, icon): '\n OSX notification using Growl\n ' import gntp.notifier growl = gntp.notifier.GrowlNotifier(applicationName=__title__, notifications=['Played tracks'], defaultNotifications=['Played tracks']) try: growl.register() growl....
OSX notification using Growl
voiceplay/player/hooks/osd.py
darwin_notify
tb0hdan/voiceplay
2
python
@classmethod def darwin_notify(cls, message, icon): '\n \n ' import gntp.notifier growl = gntp.notifier.GrowlNotifier(applicationName=__title__, notifications=['Played tracks'], defaultNotifications=['Played tracks']) try: growl.register() growl.notify(noteType='Played trac...
@classmethod def darwin_notify(cls, message, icon): '\n \n ' import gntp.notifier growl = gntp.notifier.GrowlNotifier(applicationName=__title__, notifications=['Played tracks'], defaultNotifications=['Played tracks']) try: growl.register() growl.notify(noteType='Played trac...
dcfeb7c30bb5bd6c808c5c8091d7aeafb7402a4028f59f2d95b39196dc473ee7
@classmethod def configure_argparser(cls, parser): '\n Configure argument parser for this hook\n ' parser.add_argument('-o', '--osd', action='store_true', default=False, dest='osd', help='Enable OSD')
Configure argument parser for this hook
voiceplay/player/hooks/osd.py
configure_argparser
tb0hdan/voiceplay
2
python
@classmethod def configure_argparser(cls, parser): '\n \n ' parser.add_argument('-o', '--osd', action='store_true', default=False, dest='osd', help='Enable OSD')
@classmethod def configure_argparser(cls, parser): '\n \n ' parser.add_argument('-o', '--osd', action='store_true', default=False, dest='osd', help='Enable OSD')<|docstring|>Configure argument parser for this hook<|endoftext|>
58818daeffb97b174017f69088d3cd8d9a1720db38044387b5fe783bfbf8e7a6
@classmethod def on_playback_start(cls, *args, **kwargs): '\n watch for on_playback_start events only\n ' OSDNotification.notify(*args, argparser=cls.argparser, **kwargs)
watch for on_playback_start events only
voiceplay/player/hooks/osd.py
on_playback_start
tb0hdan/voiceplay
2
python
@classmethod def on_playback_start(cls, *args, **kwargs): '\n \n ' OSDNotification.notify(*args, argparser=cls.argparser, **kwargs)
@classmethod def on_playback_start(cls, *args, **kwargs): '\n \n ' OSDNotification.notify(*args, argparser=cls.argparser, **kwargs)<|docstring|>watch for on_playback_start events only<|endoftext|>
2d01efed2fd6c8ad92ab3deeacfa72ff45d926f11bb1ae899657915d6b1159f0
def create_databases(branch_name, template=None, dry_run=False): 'Create a database for the given git branch across all connections' project_root = git_tools.get_project_root() db_name = utils.get_database_name(branch_name) success = len(settings.DATABASES) for (engine, db_info) in get_database_conn...
Create a database for the given git branch across all connections
branchdb/database/create.py
create_databases
CalgaryMichael/branchdb
0
python
def create_databases(branch_name, template=None, dry_run=False): project_root = git_tools.get_project_root() db_name = utils.get_database_name(branch_name) success = len(settings.DATABASES) for (engine, db_info) in get_database_connections(): _template = (template or db_info.get('TEMPLATE',...
def create_databases(branch_name, template=None, dry_run=False): project_root = git_tools.get_project_root() db_name = utils.get_database_name(branch_name) success = len(settings.DATABASES) for (engine, db_info) in get_database_connections(): _template = (template or db_info.get('TEMPLATE',...
98a53c41ee55f2e699577420fc4000163e20c5a8cc175494726e154cca1426a7
def add_sound(self, vehicle_sound, signal=None, response_curve=None): '\n Adds a VehicleSound with corresponding signal and response curve to the Vehicle.\n :param vehicle_sound: VehicleSound to add to Vehicle\n :param signal: attribute of Vehicle used to attenuate gain of vehicle_sound. Must b...
Adds a VehicleSound with corresponding signal and response curve to the Vehicle. :param vehicle_sound: VehicleSound to add to Vehicle :param signal: attribute of Vehicle used to attenuate gain of vehicle_sound. Must be passed with response_curve :param response_curve: curve used to calculate gain from signal. May be ca...
SumoSound/Vehicle.py
add_sound
patmalcolm91/SumoSound
1
python
def add_sound(self, vehicle_sound, signal=None, response_curve=None): '\n Adds a VehicleSound with corresponding signal and response curve to the Vehicle.\n :param vehicle_sound: VehicleSound to add to Vehicle\n :param signal: attribute of Vehicle used to attenuate gain of vehicle_sound. Must b...
def add_sound(self, vehicle_sound, signal=None, response_curve=None): '\n Adds a VehicleSound with corresponding signal and response curve to the Vehicle.\n :param vehicle_sound: VehicleSound to add to Vehicle\n :param signal: attribute of Vehicle used to attenuate gain of vehicle_sound. Must b...
b8b3a371ecb969d6f5c520ee7da464031c26da4e85f509712623955c2eefc4c0
@staticmethod def _calculate_response_from_curve(curve, x): '\n Calculates the y value of the specified curve at x\n :param curve: response curve to use to calculate value\n :param x: input signal value\n :return: output of response curve at point corresponding to x\n :type curve:...
Calculates the y value of the specified curve at x :param curve: response curve to use to calculate value :param x: input signal value :return: output of response curve at point corresponding to x :type curve: list[tuple[Union[float, int], Union[float, int]]] :type x: float
SumoSound/Vehicle.py
_calculate_response_from_curve
patmalcolm91/SumoSound
1
python
@staticmethod def _calculate_response_from_curve(curve, x): '\n Calculates the y value of the specified curve at x\n :param curve: response curve to use to calculate value\n :param x: input signal value\n :return: output of response curve at point corresponding to x\n :type curve:...
@staticmethod def _calculate_response_from_curve(curve, x): '\n Calculates the y value of the specified curve at x\n :param curve: response curve to use to calculate value\n :param x: input signal value\n :return: output of response curve at point corresponding to x\n :type curve:...
e9f6e28d7502c188f35295b113650cb8596225a484629c271a618497ea7a5bb5
def update_custom_signals(self): 'Override this method to add custom signal-updating logic. Called by update() before update_sounds().' pass
Override this method to add custom signal-updating logic. Called by update() before update_sounds().
SumoSound/Vehicle.py
update_custom_signals
patmalcolm91/SumoSound
1
python
def update_custom_signals(self): pass
def update_custom_signals(self): pass<|docstring|>Override this method to add custom signal-updating logic. Called by update() before update_sounds().<|endoftext|>
87236dfc51d4313c0270bd105dfdc78bb2bff7bf7a23dab92ed8003db8774963
def __init__(self, json): '\n Initializes the ResultItem class from the JSON provided\n :param json: String. Raw JSON data to fetch information from\n ' self.artist_name = json['artistName'] self.type = None if ('wrapperType' in json): self.type = json['wrapperType'] ...
Initializes the ResultItem class from the JSON provided :param json: String. Raw JSON data to fetch information from
itunesmusicsearch/result_item.py
__init__
fonrims/itunesmusicsearch
0
python
def __init__(self, json): '\n Initializes the ResultItem class from the JSON provided\n :param json: String. Raw JSON data to fetch information from\n ' self.artist_name = json['artistName'] self.type = None if ('wrapperType' in json): self.type = json['wrapperType'] ...
def __init__(self, json): '\n Initializes the ResultItem class from the JSON provided\n :param json: String. Raw JSON data to fetch information from\n ' self.artist_name = json['artistName'] self.type = None if ('wrapperType' in json): self.type = json['wrapperType'] ...
2343a20366ef4a558ce850861b5e3bb68e3c650b9fc80c2dbd2917742c978fb6
def __repr__(self): '\n Retrieves all keys in the class as a String\n :return: String. All the keys available in the class\n ' string = '' for (key, value) in self.__dict__.items(): if (not key.startswith('__')): string += ((('\n' + key) + ':') + str(value)) retu...
Retrieves all keys in the class as a String :return: String. All the keys available in the class
itunesmusicsearch/result_item.py
__repr__
fonrims/itunesmusicsearch
0
python
def __repr__(self): '\n Retrieves all keys in the class as a String\n :return: String. All the keys available in the class\n ' string = for (key, value) in self.__dict__.items(): if (not key.startswith('__')): string += ((('\n' + key) + ':') + str(value)) return...
def __repr__(self): '\n Retrieves all keys in the class as a String\n :return: String. All the keys available in the class\n ' string = for (key, value) in self.__dict__.items(): if (not key.startswith('__')): string += ((('\n' + key) + ':') + str(value)) return...
af9aad84d180c49d4ecefe1f70d5aac67fd63d64f1d64b3a4fe63c43d0e2a7ea
def firstUniqChar(self, s): '\n :type s: str\n :rtype: int\n ' d = {} for i in s: d[i] = (d.get(i, 0) + 1) for i in range(len(s)): if (d[s[i]] == 1): return i return (- 1)
:type s: str :rtype: int
387.first-unique-character-in-a-string.py
firstUniqChar
windard/leeeeee
0
python
def firstUniqChar(self, s): '\n :type s: str\n :rtype: int\n ' d = {} for i in s: d[i] = (d.get(i, 0) + 1) for i in range(len(s)): if (d[s[i]] == 1): return i return (- 1)
def firstUniqChar(self, s): '\n :type s: str\n :rtype: int\n ' d = {} for i in s: d[i] = (d.get(i, 0) + 1) for i in range(len(s)): if (d[s[i]] == 1): return i return (- 1)<|docstring|>:type s: str :rtype: int<|endoftext|>
6cad770b38eed56bb620fef9f3873afd8da923f3cb964759361c3ecc65c7fa80
@csrf_exempt def payment_success(request, token): 'Receive request from payment gateway after paying for an order.\n\n Redirects user to payment success.\n All post data and query strings are dropped.\n ' url = reverse('order:checkout-success', kwargs={'token': token}) return redirect(url)
Receive request from payment gateway after paying for an order. Redirects user to payment success. All post data and query strings are dropped.
saleor/order/views.py
payment_success
TropicalBastos/saleor-courses
4
python
@csrf_exempt def payment_success(request, token): 'Receive request from payment gateway after paying for an order.\n\n Redirects user to payment success.\n All post data and query strings are dropped.\n ' url = reverse('order:checkout-success', kwargs={'token': token}) return redirect(url)
@csrf_exempt def payment_success(request, token): 'Receive request from payment gateway after paying for an order.\n\n Redirects user to payment success.\n All post data and query strings are dropped.\n ' url = reverse('order:checkout-success', kwargs={'token': token}) return redirect(url)<|docstri...
011ef64c6d4ceec349ab61d78ab3120b234bb80718f4c309a2d02ffd5eec8cbd
def checkout_success(request, token): 'Redirect user after placing an order.\n\n Anonymous users are redirected to the checkout success page.\n Registered users are redirected to order details page and the order\n is attached to their account.\n ' order = get_object_or_404(Order, token=token) em...
Redirect user after placing an order. Anonymous users are redirected to the checkout success page. Registered users are redirected to order details page and the order is attached to their account.
saleor/order/views.py
checkout_success
TropicalBastos/saleor-courses
4
python
def checkout_success(request, token): 'Redirect user after placing an order.\n\n Anonymous users are redirected to the checkout success page.\n Registered users are redirected to order details page and the order\n is attached to their account.\n ' order = get_object_or_404(Order, token=token) em...
def checkout_success(request, token): 'Redirect user after placing an order.\n\n Anonymous users are redirected to the checkout success page.\n Registered users are redirected to order details page and the order\n is attached to their account.\n ' order = get_object_or_404(Order, token=token) em...
3da64f9815903ac76eb42a6a6c704fc82cd14066295fb74a403940c7405414b7
@login_required def connect_order_with_user(request, token): 'Connect newly created order to an authenticated user.' try: order = Order.objects.get(user_email=request.user.email, token=token) except Order.DoesNotExist: order = None if (not order): msg = pgettext_lazy('Connect ord...
Connect newly created order to an authenticated user.
saleor/order/views.py
connect_order_with_user
TropicalBastos/saleor-courses
4
python
@login_required def connect_order_with_user(request, token): try: order = Order.objects.get(user_email=request.user.email, token=token) except Order.DoesNotExist: order = None if (not order): msg = pgettext_lazy('Connect order with user warning message', "We couldn't assign the ...
@login_required def connect_order_with_user(request, token): try: order = Order.objects.get(user_email=request.user.email, token=token) except Order.DoesNotExist: order = None if (not order): msg = pgettext_lazy('Connect order with user warning message', "We couldn't assign the ...
0ff25ee9ec6280f0427b355956ebaed0c5b7da42f5db65071f9daad4614e3e96
def __virtual__(): '\n Check for OpenNebula configs.\n ' if (not HAS_XML_LIBS): return False if (get_configured_provider() is False): return False return __virtualname__
Check for OpenNebula configs.
salt/cloud/clouds/opennebula.py
__virtual__
seblu/salt
2
python
def __virtual__(): '\n \n ' if (not HAS_XML_LIBS): return False if (get_configured_provider() is False): return False return __virtualname__
def __virtual__(): '\n \n ' if (not HAS_XML_LIBS): return False if (get_configured_provider() is False): return False return __virtualname__<|docstring|>Check for OpenNebula configs.<|endoftext|>
8ac43e39d7128adc334dcc08344912729da35723a45b72bbb69a617e8578d199
def get_configured_provider(): '\n Return the first configured instance.\n ' return config.is_provider_configured(__opts__, (__active_provider_name__ or 'opennebula'), ('xml_rpc', 'user', 'password'))
Return the first configured instance.
salt/cloud/clouds/opennebula.py
get_configured_provider
seblu/salt
2
python
def get_configured_provider(): '\n \n ' return config.is_provider_configured(__opts__, (__active_provider_name__ or 'opennebula'), ('xml_rpc', 'user', 'password'))
def get_configured_provider(): '\n \n ' return config.is_provider_configured(__opts__, (__active_provider_name__ or 'opennebula'), ('xml_rpc', 'user', 'password'))<|docstring|>Return the first configured instance.<|endoftext|>
913a01aa3fe7477af8e776ce25cf6fc1fa100e1707a3be2705e6b455a5f05e02
def avail_images(call=None): '\n Return available OpenNebula images.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud --list-images opennebula\n salt-cloud --function avail_images opennebula\n ...
Return available OpenNebula images. call Optional type of call to use with this function such as ``function``. CLI Example: .. code-block:: bash salt-cloud --list-images opennebula salt-cloud --function avail_images opennebula salt-cloud -f avail_images opennebula
salt/cloud/clouds/opennebula.py
avail_images
seblu/salt
2
python
def avail_images(call=None): '\n Return available OpenNebula images.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud --list-images opennebula\n salt-cloud --function avail_images opennebula\n ...
def avail_images(call=None): '\n Return available OpenNebula images.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud --list-images opennebula\n salt-cloud --function avail_images opennebula\n ...
c628d330049d54c1d268ca94ec17cf2b4570a1ccbf013191ba0da91ecfd621e5
def avail_locations(call=None): '\n Return available OpenNebula locations.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud --list-locations opennebula\n salt-cloud --function avail_locations op...
Return available OpenNebula locations. call Optional type of call to use with this function such as ``function``. CLI Example: .. code-block:: bash salt-cloud --list-locations opennebula salt-cloud --function avail_locations opennebula salt-cloud -f avail_locations opennebula
salt/cloud/clouds/opennebula.py
avail_locations
seblu/salt
2
python
def avail_locations(call=None): '\n Return available OpenNebula locations.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud --list-locations opennebula\n salt-cloud --function avail_locations op...
def avail_locations(call=None): '\n Return available OpenNebula locations.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud --list-locations opennebula\n salt-cloud --function avail_locations op...
e20af5bdddf3282d7488a03af3368b00a0fe83f5af9ef2ba22806bdd6c5660f7
def avail_sizes(): '\n Because sizes are built into templates with OpenNebula, there will be no sizes to\n return here.\n ' log.info('Because sizes are built into templates with OpenNebula, there are no sizes to return.') return {}
Because sizes are built into templates with OpenNebula, there will be no sizes to return here.
salt/cloud/clouds/opennebula.py
avail_sizes
seblu/salt
2
python
def avail_sizes(): '\n Because sizes are built into templates with OpenNebula, there will be no sizes to\n return here.\n ' log.info('Because sizes are built into templates with OpenNebula, there are no sizes to return.') return {}
def avail_sizes(): '\n Because sizes are built into templates with OpenNebula, there will be no sizes to\n return here.\n ' log.info('Because sizes are built into templates with OpenNebula, there are no sizes to return.') return {}<|docstring|>Because sizes are built into templates with OpenNebula,...
241da26866deb082e7b780c257ef279882f768d56871f765201f2efb80d5842a
def list_nodes(call=None): '\n Return a list of VMs on OpenNebubla.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -Q\n salt-cloud --query\n salt-cloud --fuction list_nodes opennebula\n...
Return a list of VMs on OpenNebubla. call Optional type of call to use with this function such as ``function``. CLI Example: .. code-block:: bash salt-cloud -Q salt-cloud --query salt-cloud --fuction list_nodes opennebula salt-cloud -f list_nodes opennebula
salt/cloud/clouds/opennebula.py
list_nodes
seblu/salt
2
python
def list_nodes(call=None): '\n Return a list of VMs on OpenNebubla.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -Q\n salt-cloud --query\n salt-cloud --fuction list_nodes opennebula\n...
def list_nodes(call=None): '\n Return a list of VMs on OpenNebubla.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -Q\n salt-cloud --query\n salt-cloud --fuction list_nodes opennebula\n...
0cf10094b6397849817f3c655eacb7c5ea0ac6dc0a9ce7c3e6c8f9b4467f44b1
def list_nodes_full(call=None): '\n Return a list of the VMs that are on the provider.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -F\n salt-cloud --full-query\n salt-cloud --functio...
Return a list of the VMs that are on the provider. call Optional type of call to use with this function such as ``function``. CLI Example: .. code-block:: bash salt-cloud -F salt-cloud --full-query salt-cloud --function list_nodes_full opennebula salt-cloud -f list_nodes_full opennebula
salt/cloud/clouds/opennebula.py
list_nodes_full
seblu/salt
2
python
def list_nodes_full(call=None): '\n Return a list of the VMs that are on the provider.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -F\n salt-cloud --full-query\n salt-cloud --functio...
def list_nodes_full(call=None): '\n Return a list of the VMs that are on the provider.\n\n call\n Optional type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -F\n salt-cloud --full-query\n salt-cloud --functio...
4e41385ffaf1eae46d775b3dbb19e7aa75891e9fe4c4eead4c1ed78bb531310c
def list_nodes_select(call=None): '\n Return a list of the VMs that are on the provider, with select fields.\n\n call\n Optional type of call to use with this function such as ``function``.\n ' if (call == 'action'): raise SaltCloudSystemExit('The list_nodes_full function must be called ...
Return a list of the VMs that are on the provider, with select fields. call Optional type of call to use with this function such as ``function``.
salt/cloud/clouds/opennebula.py
list_nodes_select
seblu/salt
2
python
def list_nodes_select(call=None): '\n Return a list of the VMs that are on the provider, with select fields.\n\n call\n Optional type of call to use with this function such as ``function``.\n ' if (call == 'action'): raise SaltCloudSystemExit('The list_nodes_full function must be called ...
def list_nodes_select(call=None): '\n Return a list of the VMs that are on the provider, with select fields.\n\n call\n Optional type of call to use with this function such as ``function``.\n ' if (call == 'action'): raise SaltCloudSystemExit('The list_nodes_full function must be called ...
38d14df0a337f871f094cb159e441328a0de7fb5443814d87a66f05d56f9979f
def list_security_groups(call=None): "\n Lists all security groups available to the user and the user's groups.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f list_security_groups opennebula\n " if (call != 'function'): raise SaltCloudSystem...
Lists all security groups available to the user and the user's groups. .. versionadded:: Boron CLI Example: .. code-block:: bash salt-cloud -f list_security_groups opennebula
salt/cloud/clouds/opennebula.py
list_security_groups
seblu/salt
2
python
def list_security_groups(call=None): "\n Lists all security groups available to the user and the user's groups.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f list_security_groups opennebula\n " if (call != 'function'): raise SaltCloudSystem...
def list_security_groups(call=None): "\n Lists all security groups available to the user and the user's groups.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f list_security_groups opennebula\n " if (call != 'function'): raise SaltCloudSystem...
1ff2d46f4fbb34147b0b91c43c5f7941d57ffb87c25d9eb4b996fb2fb04156af
def list_templates(call=None): "\n Lists all templates available to the user and the user's groups.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f list_templates opennebula\n " if (call != 'function'): raise SaltCloudSystemExit('The list_tem...
Lists all templates available to the user and the user's groups. .. versionadded:: Boron CLI Example: .. code-block:: bash salt-cloud -f list_templates opennebula
salt/cloud/clouds/opennebula.py
list_templates
seblu/salt
2
python
def list_templates(call=None): "\n Lists all templates available to the user and the user's groups.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f list_templates opennebula\n " if (call != 'function'): raise SaltCloudSystemExit('The list_tem...
def list_templates(call=None): "\n Lists all templates available to the user and the user's groups.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f list_templates opennebula\n " if (call != 'function'): raise SaltCloudSystemExit('The list_tem...
874cb1443123e3b9f430524ff6bb1b97d6e6dc599647c727927e4167a376bed7
def list_vns(call=None): "\n Lists all virtual networks available to the user and the user's groups.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f list_vns opennebula\n " if (call != 'function'): raise SaltCloudSystemExit('The list_vns func...
Lists all virtual networks available to the user and the user's groups. .. versionadded:: Boron CLI Example: .. code-block:: bash salt-cloud -f list_vns opennebula
salt/cloud/clouds/opennebula.py
list_vns
seblu/salt
2
python
def list_vns(call=None): "\n Lists all virtual networks available to the user and the user's groups.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f list_vns opennebula\n " if (call != 'function'): raise SaltCloudSystemExit('The list_vns func...
def list_vns(call=None): "\n Lists all virtual networks available to the user and the user's groups.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f list_vns opennebula\n " if (call != 'function'): raise SaltCloudSystemExit('The list_vns func...
2664d6d7e2ac160381c3d87ef6b6c130f05f7bdfc3f4424097eeadaeee7b8e8f
def reboot(name, call=None): '\n Reboot a VM.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to reboot.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a reboot my-vm\n ' if (call != 'action'): raise SaltCloudSystemExit('The start action must be calle...
Reboot a VM. .. versionadded:: Boron name The name of the VM to reboot. CLI Example: .. code-block:: bash salt-cloud -a reboot my-vm
salt/cloud/clouds/opennebula.py
reboot
seblu/salt
2
python
def reboot(name, call=None): '\n Reboot a VM.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to reboot.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a reboot my-vm\n ' if (call != 'action'): raise SaltCloudSystemExit('The start action must be calle...
def reboot(name, call=None): '\n Reboot a VM.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to reboot.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a reboot my-vm\n ' if (call != 'action'): raise SaltCloudSystemExit('The start action must be calle...
ee04786229286ba88b21b1d2e07e43a54a14b8b23bb5bff8c033b85703a71365
def start(name, call=None): '\n Start a VM.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to start.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a start my-vm\n ' if (call != 'action'): raise SaltCloudSystemExit('The start action must be called wi...
Start a VM. .. versionadded:: Boron name The name of the VM to start. CLI Example: .. code-block:: bash salt-cloud -a start my-vm
salt/cloud/clouds/opennebula.py
start
seblu/salt
2
python
def start(name, call=None): '\n Start a VM.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to start.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a start my-vm\n ' if (call != 'action'): raise SaltCloudSystemExit('The start action must be called wi...
def start(name, call=None): '\n Start a VM.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to start.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a start my-vm\n ' if (call != 'action'): raise SaltCloudSystemExit('The start action must be called wi...
24917d024404bdb06b765138947f3811681105631924081286e2bb8ca0d56725
def stop(name, call=None): '\n Stop a VM.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to stop.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a stop my-vm\n ' if (call != 'action'): raise SaltCloudSystemExit('The start action must be called with -...
Stop a VM. .. versionadded:: Boron name The name of the VM to stop. CLI Example: .. code-block:: bash salt-cloud -a stop my-vm
salt/cloud/clouds/opennebula.py
stop
seblu/salt
2
python
def stop(name, call=None): '\n Stop a VM.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to stop.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a stop my-vm\n ' if (call != 'action'): raise SaltCloudSystemExit('The start action must be called with -...
def stop(name, call=None): '\n Stop a VM.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to stop.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -a stop my-vm\n ' if (call != 'action'): raise SaltCloudSystemExit('The start action must be called with -...
2a52ad171c8a9041314def3c1d922b13d8b7764f37ff31609bc9491b3985ea62
def get_image(vm_): '\n Return the image object to use.\n\n vm_\n The VM for which to obtain an image.\n ' images = avail_images() vm_image = str(config.get_cloud_config_value('image', vm_, __opts__, search_global=False)) for image in images: if (vm_image in (images[image]['name'...
Return the image object to use. vm_ The VM for which to obtain an image.
salt/cloud/clouds/opennebula.py
get_image
seblu/salt
2
python
def get_image(vm_): '\n Return the image object to use.\n\n vm_\n The VM for which to obtain an image.\n ' images = avail_images() vm_image = str(config.get_cloud_config_value('image', vm_, __opts__, search_global=False)) for image in images: if (vm_image in (images[image]['name'...
def get_image(vm_): '\n Return the image object to use.\n\n vm_\n The VM for which to obtain an image.\n ' images = avail_images() vm_image = str(config.get_cloud_config_value('image', vm_, __opts__, search_global=False)) for image in images: if (vm_image in (images[image]['name'...
8285a0f0ea423674133a157894e8f193c8487a00a5aa42cbf3b28ca2a9cc9b48
def get_image_id(kwargs=None, call=None): "\n Returns an image's ID from the given image name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_image_id opennebula name=my-image-name\n " if (call == 'action'): raise SaltCloudSystemExit('Th...
Returns an image's ID from the given image name. .. versionadded:: Boron CLI Example: .. code-block:: bash salt-cloud -f get_image_id opennebula name=my-image-name
salt/cloud/clouds/opennebula.py
get_image_id
seblu/salt
2
python
def get_image_id(kwargs=None, call=None): "\n Returns an image's ID from the given image name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_image_id opennebula name=my-image-name\n " if (call == 'action'): raise SaltCloudSystemExit('Th...
def get_image_id(kwargs=None, call=None): "\n Returns an image's ID from the given image name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_image_id opennebula name=my-image-name\n " if (call == 'action'): raise SaltCloudSystemExit('Th...
f90f5fcc803bc167e277c3cfb49c613431e460cab66406e3daf2ac2db24dd986
def get_location(vm_): "\n Return the VM's location.\n\n vm_\n The VM for which to obtain a location.\n " locations = avail_locations() vm_location = str(config.get_cloud_config_value('location', vm_, __opts__, search_global=False)) if (vm_location == 'None'): return None for...
Return the VM's location. vm_ The VM for which to obtain a location.
salt/cloud/clouds/opennebula.py
get_location
seblu/salt
2
python
def get_location(vm_): "\n Return the VM's location.\n\n vm_\n The VM for which to obtain a location.\n " locations = avail_locations() vm_location = str(config.get_cloud_config_value('location', vm_, __opts__, search_global=False)) if (vm_location == 'None'): return None for...
def get_location(vm_): "\n Return the VM's location.\n\n vm_\n The VM for which to obtain a location.\n " locations = avail_locations() vm_location = str(config.get_cloud_config_value('location', vm_, __opts__, search_global=False)) if (vm_location == 'None'): return None for...
9a0eb2e84a046ec92d0d19d53a30491472ca65b456011c2af9cc717d9aa4ab27
def get_secgroup_id(kwargs=None, call=None): "\n Returns a security group's ID from the given security group name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_secgroup_id opennebula name=my-secgroup-name\n " if (call == 'action'): rai...
Returns a security group's ID from the given security group name. .. versionadded:: Boron CLI Example: .. code-block:: bash salt-cloud -f get_secgroup_id opennebula name=my-secgroup-name
salt/cloud/clouds/opennebula.py
get_secgroup_id
seblu/salt
2
python
def get_secgroup_id(kwargs=None, call=None): "\n Returns a security group's ID from the given security group name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_secgroup_id opennebula name=my-secgroup-name\n " if (call == 'action'): rai...
def get_secgroup_id(kwargs=None, call=None): "\n Returns a security group's ID from the given security group name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_secgroup_id opennebula name=my-secgroup-name\n " if (call == 'action'): rai...
cc2ce89a145e227ba01e4662e6eac4bcea22778b6a2594c361437cceefd0e48f
def get_template_id(kwargs=None, call=None): "\n Returns a template's ID from the given template name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_template_id opennebula name=my-template-name\n " if (call == 'action'): raise SaltCloud...
Returns a template's ID from the given template name. .. versionadded:: Boron CLI Example: .. code-block:: bash salt-cloud -f get_template_id opennebula name=my-template-name
salt/cloud/clouds/opennebula.py
get_template_id
seblu/salt
2
python
def get_template_id(kwargs=None, call=None): "\n Returns a template's ID from the given template name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_template_id opennebula name=my-template-name\n " if (call == 'action'): raise SaltCloud...
def get_template_id(kwargs=None, call=None): "\n Returns a template's ID from the given template name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_template_id opennebula name=my-template-name\n " if (call == 'action'): raise SaltCloud...
68ddf097f362a942a556b128aab179a0639237121782a1d847e78db2457c6f70
def get_vm_id(kwargs=None, call=None): "\n Returns a virtual machine's ID from the given virtual machine's name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_vm_id opennebula name=my-vm\n " if (call == 'action'): raise SaltCloudSystemE...
Returns a virtual machine's ID from the given virtual machine's name. .. versionadded:: Boron CLI Example: .. code-block:: bash salt-cloud -f get_vm_id opennebula name=my-vm
salt/cloud/clouds/opennebula.py
get_vm_id
seblu/salt
2
python
def get_vm_id(kwargs=None, call=None): "\n Returns a virtual machine's ID from the given virtual machine's name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_vm_id opennebula name=my-vm\n " if (call == 'action'): raise SaltCloudSystemE...
def get_vm_id(kwargs=None, call=None): "\n Returns a virtual machine's ID from the given virtual machine's name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_vm_id opennebula name=my-vm\n " if (call == 'action'): raise SaltCloudSystemE...
56ae8473488e929e4166904d8f544b300f989d2a7032f00aece4e09d59836b28
def get_vn_id(kwargs=None, call=None): "\n Returns a virtual network's ID from the given virtual network's name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_vn_id opennebula name=my-vn-name\n " if (call == 'action'): raise SaltCloudSy...
Returns a virtual network's ID from the given virtual network's name. .. versionadded:: Boron CLI Example: .. code-block:: bash salt-cloud -f get_vn_id opennebula name=my-vn-name
salt/cloud/clouds/opennebula.py
get_vn_id
seblu/salt
2
python
def get_vn_id(kwargs=None, call=None): "\n Returns a virtual network's ID from the given virtual network's name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_vn_id opennebula name=my-vn-name\n " if (call == 'action'): raise SaltCloudSy...
def get_vn_id(kwargs=None, call=None): "\n Returns a virtual network's ID from the given virtual network's name.\n\n .. versionadded:: Boron\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f get_vn_id opennebula name=my-vn-name\n " if (call == 'action'): raise SaltCloudSy...
5bb8b5b578a8560af9856f84404dd486e3e272a1583bdb82dce50b2762bf8536
def create(vm_): '\n Create a single VM from a data dict.\n\n vm_\n The name of the VM to create.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -p my-opennebula-profile vm_name\n\n ' try: if (config.is_profile_configured(__opts__, (__active_provider_name__ or 'ope...
Create a single VM from a data dict. vm_ The name of the VM to create. CLI Example: .. code-block:: bash salt-cloud -p my-opennebula-profile vm_name
salt/cloud/clouds/opennebula.py
create
seblu/salt
2
python
def create(vm_): '\n Create a single VM from a data dict.\n\n vm_\n The name of the VM to create.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -p my-opennebula-profile vm_name\n\n ' try: if (config.is_profile_configured(__opts__, (__active_provider_name__ or 'ope...
def create(vm_): '\n Create a single VM from a data dict.\n\n vm_\n The name of the VM to create.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -p my-opennebula-profile vm_name\n\n ' try: if (config.is_profile_configured(__opts__, (__active_provider_name__ or 'ope...
4d84aaebd6eaaa6e594d735c06324cc40e174ef6df8fe140d2dee24c3fab0b75
def destroy(name, call=None): '\n Destroy a node. Will check termination protection and warn if enabled.\n\n name\n The name of the vm to be destroyed.\n\n call\n Optional type of call to use with this function such as ``action``.\n\n CLI Example:\n\n .. code-block:: bash\n\n sal...
Destroy a node. Will check termination protection and warn if enabled. name The name of the vm to be destroyed. call Optional type of call to use with this function such as ``action``. CLI Example: .. code-block:: bash salt-cloud --destroy vm_name salt-cloud -d vm_name salt-cloud --action destr...
salt/cloud/clouds/opennebula.py
destroy
seblu/salt
2
python
def destroy(name, call=None): '\n Destroy a node. Will check termination protection and warn if enabled.\n\n name\n The name of the vm to be destroyed.\n\n call\n Optional type of call to use with this function such as ``action``.\n\n CLI Example:\n\n .. code-block:: bash\n\n sal...
def destroy(name, call=None): '\n Destroy a node. Will check termination protection and warn if enabled.\n\n name\n The name of the vm to be destroyed.\n\n call\n Optional type of call to use with this function such as ``action``.\n\n CLI Example:\n\n .. code-block:: bash\n\n sal...
a40102774fed999e59d59fc3bb987297632850a80c2fba9c4964f3d8ab038db3
def image_allocate(call=None, kwargs=None): '\n Allocates a new image in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the template of the image to allocate.\n Syntax within the file can be the usual attribute=value or XML.\n\n datastore_id\n The I...
Allocates a new image in OpenNebula. .. versionadded:: Boron 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. datastore_id The ID of the data-store to be used for the new image. CLI Example: .. code-block:: bash ...
salt/cloud/clouds/opennebula.py
image_allocate
seblu/salt
2
python
def image_allocate(call=None, kwargs=None): '\n Allocates a new image in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the template of the image to allocate.\n Syntax within the file can be the usual attribute=value or XML.\n\n datastore_id\n The I...
def image_allocate(call=None, kwargs=None): '\n Allocates a new image in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the template of the image to allocate.\n Syntax within the file can be the usual attribute=value or XML.\n\n datastore_id\n The I...
6d00b603d25e3d28e69fabce72b522c175a0cf337757b6923285c4432b35ea46
def image_clone(call=None, kwargs=None): '\n Clones an existing image.\n\n .. versionadded:: Boron\n\n name\n The name of the new image.\n\n image_id\n The ID of the image to be cloned.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f image_clone opennebula name=my-...
Clones an existing image. .. versionadded:: Boron name The name of the new image. image_id The ID of the image to be cloned. CLI Example: .. code-block:: bash salt-cloud -f image_clone opennebula name=my-new-image image_id=10
salt/cloud/clouds/opennebula.py
image_clone
seblu/salt
2
python
def image_clone(call=None, kwargs=None): '\n Clones an existing image.\n\n .. versionadded:: Boron\n\n name\n The name of the new image.\n\n image_id\n The ID of the image to be cloned.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f image_clone opennebula name=my-...
def image_clone(call=None, kwargs=None): '\n Clones an existing image.\n\n .. versionadded:: Boron\n\n name\n The name of the new image.\n\n image_id\n The ID of the image to be cloned.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f image_clone opennebula name=my-...
ab43806bbc9d511eace221a349386e124b996293779c36906caa31b2ed630991
def image_delete(call=None, kwargs=None): '\n Deletes the given image from OpenNebula. Either a name or an image_id must\n be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the image to delete.\n\n image_id\n The ID of the image to delete.\n\n CLI Example:\n\n .. cod...
Deletes the given image from OpenNebula. Either a name or an image_id must be supplied. .. versionadded:: Boron name The name of the image to delete. image_id The ID of the image to delete. CLI Example: .. code-block:: bash salt-cloud -f image_delete opennebula name=my-image salt-cloud --function ...
salt/cloud/clouds/opennebula.py
image_delete
seblu/salt
2
python
def image_delete(call=None, kwargs=None): '\n Deletes the given image from OpenNebula. Either a name or an image_id must\n be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the image to delete.\n\n image_id\n The ID of the image to delete.\n\n CLI Example:\n\n .. cod...
def image_delete(call=None, kwargs=None): '\n Deletes the given image from OpenNebula. Either a name or an image_id must\n be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the image to delete.\n\n image_id\n The ID of the image to delete.\n\n CLI Example:\n\n .. cod...
2b997d038284c2b14162d80917d124eb7648db7ab6ba8a482a890106dc9082d8
def image_info(call=None, kwargs=None): '\n Retrieves information for a given image. Either a name or an image_id must be\n supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the image for which to gather information.\n\n template_id\n The ID of the image for which to gather i...
Retrieves information for a given image. Either a name or an image_id must be supplied. .. versionadded:: Boron name The name of the image for which to gather information. template_id The ID of the image for which to gather information. CLI Example: .. code-block:: bash salt-cloud -f image_info openne...
salt/cloud/clouds/opennebula.py
image_info
seblu/salt
2
python
def image_info(call=None, kwargs=None): '\n Retrieves information for a given image. Either a name or an image_id must be\n supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the image for which to gather information.\n\n template_id\n The ID of the image for which to gather i...
def image_info(call=None, kwargs=None): '\n Retrieves information for a given image. Either a name or an image_id must be\n supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the image for which to gather information.\n\n template_id\n The ID of the image for which to gather i...
37504d61272c7d97cc74aa18fa6892d9bb5d6d267c1c988ac049c37839caa9a2
def image_persistent(call=None, kwargs=None): '\n Sets the Image as persistent or not persistent.\n\n .. versionadded:: Boron\n\n name\n The name of the image to set.\n\n persist\n A boolean value to set the image as persistent or not. Set to true\n for persistent, false for non-per...
Sets the Image as persistent or not persistent. .. versionadded:: Boron name The name of the image to set. persist A boolean value to set the image as persistent or not. Set to true for persistent, false for non-persisent. template_id The ID of the image to set. CLI Example: .. code-block:: bash ...
salt/cloud/clouds/opennebula.py
image_persistent
seblu/salt
2
python
def image_persistent(call=None, kwargs=None): '\n Sets the Image as persistent or not persistent.\n\n .. versionadded:: Boron\n\n name\n The name of the image to set.\n\n persist\n A boolean value to set the image as persistent or not. Set to true\n for persistent, false for non-per...
def image_persistent(call=None, kwargs=None): '\n Sets the Image as persistent or not persistent.\n\n .. versionadded:: Boron\n\n name\n The name of the image to set.\n\n persist\n A boolean value to set the image as persistent or not. Set to true\n for persistent, false for non-per...
04e8ece5d445cf87b3e0cc66182ebfd66e023d9930eb1a64d46e2ecf55f88b88
def image_snapshot_delete(call=None, kwargs=None): '\n Deletes a snapshot from the image.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image from which to delete the snapshot.\n\n snapshot_id\n The ID of the snapshot to delete.\n\n CLI Example:\n\n .. code-block:: bash\n\...
Deletes a snapshot from the image. .. versionadded:: Boron image_id The ID of the image from which to delete the snapshot. snapshot_id The ID of the snapshot to delete. CLI Example: .. code-block:: bash salt-cloud -f image_snapshot_delete vm_id=106 snapshot_id=45
salt/cloud/clouds/opennebula.py
image_snapshot_delete
seblu/salt
2
python
def image_snapshot_delete(call=None, kwargs=None): '\n Deletes a snapshot from the image.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image from which to delete the snapshot.\n\n snapshot_id\n The ID of the snapshot to delete.\n\n CLI Example:\n\n .. code-block:: bash\n\...
def image_snapshot_delete(call=None, kwargs=None): '\n Deletes a snapshot from the image.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image from which to delete the snapshot.\n\n snapshot_id\n The ID of the snapshot to delete.\n\n CLI Example:\n\n .. code-block:: bash\n\...
088b0d128333c5071d5e80606ba0574d2e55b2465eb04ef4d8f9db750834ead4
def image_snapshot_revert(call=None, kwargs=None): '\n Reverts an image state to a previous snapshot.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image to revert.\n\n snapshot_id\n The ID of the snapshot to which the image will be reverted.\n\n CLI Example:\n\n .. code-b...
Reverts an image state to a previous snapshot. .. versionadded:: Boron image_id The ID of the image to revert. snapshot_id The ID of the snapshot to which the image will be reverted. CLI Example: .. code-block:: bash salt-cloud -f image_snapshot_revert vm_id=106 snapshot_id=45
salt/cloud/clouds/opennebula.py
image_snapshot_revert
seblu/salt
2
python
def image_snapshot_revert(call=None, kwargs=None): '\n Reverts an image state to a previous snapshot.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image to revert.\n\n snapshot_id\n The ID of the snapshot to which the image will be reverted.\n\n CLI Example:\n\n .. code-b...
def image_snapshot_revert(call=None, kwargs=None): '\n Reverts an image state to a previous snapshot.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image to revert.\n\n snapshot_id\n The ID of the snapshot to which the image will be reverted.\n\n CLI Example:\n\n .. code-b...
b638832f4bbbd48fa2790f9d730ac26880f1810bcf5401271c818aaad428c966
def image_snapshot_flatten(call=None, kwargs=None): '\n Flatten the snapshot of an image and discards others.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image.\n\n snapshot_id\n The ID of the snapshot to flatten.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt...
Flatten the snapshot of an image and discards others. .. versionadded:: Boron image_id The ID of the image. snapshot_id The ID of the snapshot to flatten. CLI Example: .. code-block:: bash salt-cloud -f image_snapshot_flatten vm_id=106 snapshot_id=45
salt/cloud/clouds/opennebula.py
image_snapshot_flatten
seblu/salt
2
python
def image_snapshot_flatten(call=None, kwargs=None): '\n Flatten the snapshot of an image and discards others.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image.\n\n snapshot_id\n The ID of the snapshot to flatten.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt...
def image_snapshot_flatten(call=None, kwargs=None): '\n Flatten the snapshot of an image and discards others.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image.\n\n snapshot_id\n The ID of the snapshot to flatten.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt...
599bcb0673bceb2f46a145a69a33f9c9f597449cc4412a8c3a0e2e7bc36d5fc8
def image_update(call=None, kwargs=None): '\n Replaces the image template contents.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image to update.\n\n path\n The path to a file containing the template of the image. Syntax within the\n file can be the usual attribute=value...
Replaces the image template contents. .. versionadded:: Boron image_id The ID of the image to update. path The path to a file containing the template of the image. Syntax within the file can be the usual attribute=value or XML. update_type There are two ways to update an image: ``replace`` the whole...
salt/cloud/clouds/opennebula.py
image_update
seblu/salt
2
python
def image_update(call=None, kwargs=None): '\n Replaces the image template contents.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image to update.\n\n path\n The path to a file containing the template of the image. Syntax within the\n file can be the usual attribute=value...
def image_update(call=None, kwargs=None): '\n Replaces the image template contents.\n\n .. versionadded:: Boron\n\n image_id\n The ID of the image to update.\n\n path\n The path to a file containing the template of the image. Syntax within the\n file can be the usual attribute=value...
dbdcdd0201266dc8ccd6d8437da1327d94789e3424964e8920e127419ef7402b
def script(vm_): '\n Return the script deployment object.\n\n vm_\n The VM for which to deploy a script.\n ' deploy_script = salt.utils.cloud.os_script(config.get_cloud_config_value('script', vm_, __opts__), vm_, __opts__, salt.utils.cloud.salt_config_to_yaml(salt.utils.cloud.minion_config(__opt...
Return the script deployment object. vm_ The VM for which to deploy a script.
salt/cloud/clouds/opennebula.py
script
seblu/salt
2
python
def script(vm_): '\n Return the script deployment object.\n\n vm_\n The VM for which to deploy a script.\n ' deploy_script = salt.utils.cloud.os_script(config.get_cloud_config_value('script', vm_, __opts__), vm_, __opts__, salt.utils.cloud.salt_config_to_yaml(salt.utils.cloud.minion_config(__opt...
def script(vm_): '\n Return the script deployment object.\n\n vm_\n The VM for which to deploy a script.\n ' deploy_script = salt.utils.cloud.os_script(config.get_cloud_config_value('script', vm_, __opts__), vm_, __opts__, salt.utils.cloud.salt_config_to_yaml(salt.utils.cloud.minion_config(__opt...
21688a09a425371fca5c7cdb33314620f8f7c31b6c62cec734d57d3985d23e4e
def show_instance(name, call=None): '\n Show the details from OpenNebula concerning a named VM.\n\n name\n The name of the VM for which to display details.\n\n call\n Type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-c...
Show the details from OpenNebula concerning a named VM. name The name of the VM for which to display details. call Type of call to use with this function such as ``function``. CLI Example: .. code-block:: bash salt-cloud --action show_instance vm_name salt-cloud -a show_instance vm_name
salt/cloud/clouds/opennebula.py
show_instance
seblu/salt
2
python
def show_instance(name, call=None): '\n Show the details from OpenNebula concerning a named VM.\n\n name\n The name of the VM for which to display details.\n\n call\n Type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-c...
def show_instance(name, call=None): '\n Show the details from OpenNebula concerning a named VM.\n\n name\n The name of the VM for which to display details.\n\n call\n Type of call to use with this function such as ``function``.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-c...
bea92d70a08804858a3c53a58dfdab78e593d8f70604bde2179b36e24996f38c
def secgroup_allocate(call=None, kwargs=None): '\n Allocates a new security group in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the template of the security group. Syntax\n within the file can be the usual attribute=value or XML.\n\n CLI Example:\n\n ...
Allocates a new security group in OpenNebula. .. versionadded:: Boron path The path to a file containing the template of the security group. Syntax within the file can be the usual attribute=value or XML. CLI Example: .. code-block:: bash salt-cloud -f secgroup_allocate opennebula file=/path/to/secgrou...
salt/cloud/clouds/opennebula.py
secgroup_allocate
seblu/salt
2
python
def secgroup_allocate(call=None, kwargs=None): '\n Allocates a new security group in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the template of the security group. Syntax\n within the file can be the usual attribute=value or XML.\n\n CLI Example:\n\n ...
def secgroup_allocate(call=None, kwargs=None): '\n Allocates a new security group in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the template of the security group. Syntax\n within the file can be the usual attribute=value or XML.\n\n CLI Example:\n\n ...
24efd446b6252bb5d40bfb2c9dc4de4baf88453cf277994c82a4808210cca1be
def secgroup_clone(call=None, kwargs=None): '\n Clones an existing security group.\n\n .. versionadded:: Boron\n\n name\n The name of the new template.\n\n secgroup_id\n The ID of the template to be cloned.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f secgroup_c...
Clones an existing security group. .. versionadded:: Boron name The name of the new template. secgroup_id The ID of the template to be cloned. CLI Example: .. code-block:: bash salt-cloud -f secgroup_clone opennebula name=my-cloned-secgroup secgroup_id=0
salt/cloud/clouds/opennebula.py
secgroup_clone
seblu/salt
2
python
def secgroup_clone(call=None, kwargs=None): '\n Clones an existing security group.\n\n .. versionadded:: Boron\n\n name\n The name of the new template.\n\n secgroup_id\n The ID of the template to be cloned.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f secgroup_c...
def secgroup_clone(call=None, kwargs=None): '\n Clones an existing security group.\n\n .. versionadded:: Boron\n\n name\n The name of the new template.\n\n secgroup_id\n The ID of the template to be cloned.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f secgroup_c...
20086ebc1ec6f9313a77dbc8ab46ebabcde70dd6bcf02f3c0295ea54719a317d
def secgroup_delete(call=None, kwargs=None): '\n Deletes the given security group from OpenNebula. Either a name or a secgroup_id\n must be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the security group to delete.\n\n secgroup_id\n The ID of the security group to delete...
Deletes the given security group from OpenNebula. Either a name or a secgroup_id must be supplied. .. versionadded:: Boron name The name of the security group to delete. secgroup_id The ID of the security group to delete. CLI Example: .. code-block:: bash salt-cloud -f secgroup_delete opennebula name=...
salt/cloud/clouds/opennebula.py
secgroup_delete
seblu/salt
2
python
def secgroup_delete(call=None, kwargs=None): '\n Deletes the given security group from OpenNebula. Either a name or a secgroup_id\n must be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the security group to delete.\n\n secgroup_id\n The ID of the security group to delete...
def secgroup_delete(call=None, kwargs=None): '\n Deletes the given security group from OpenNebula. Either a name or a secgroup_id\n must be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the security group to delete.\n\n secgroup_id\n The ID of the security group to delete...
0ae501c4100f5839534896982a2a04242bb55ac41cd6128952d65433b223cc98
def secgroup_info(call=None, kwargs=None): '\n Retrieves information for the given security group. Either a name or a\n secgroup_id must be supplied.\n\n name\n The name of the security group for which to gather information.\n\n template_id\n The ID of the security group for which to gathe...
Retrieves information for the given security group. Either a name or a secgroup_id must be supplied. name The name of the security group for which to gather information. template_id The ID of the security group for which to gather information. CLI Example: .. code-block:: bash salt-cloud -f secgroup_in...
salt/cloud/clouds/opennebula.py
secgroup_info
seblu/salt
2
python
def secgroup_info(call=None, kwargs=None): '\n Retrieves information for the given security group. Either a name or a\n secgroup_id must be supplied.\n\n name\n The name of the security group for which to gather information.\n\n template_id\n The ID of the security group for which to gathe...
def secgroup_info(call=None, kwargs=None): '\n Retrieves information for the given security group. Either a name or a\n secgroup_id must be supplied.\n\n name\n The name of the security group for which to gather information.\n\n template_id\n The ID of the security group for which to gathe...
c25144189382d930e282fb799e51baf502f980b32aef4a5e1f8fac4a87582e08
def secgroup_update(call=None, kwargs=None): '\n Replaces the security group template contents.\n\n .. versionadded:: Boron\n\n secgroup_id\n The ID of the security group to update.\n\n path\n The path to a file containing the template of the security group. Syntax\n within the file...
Replaces the security group template contents. .. versionadded:: Boron secgroup_id The ID of the security group to update. path The path to a file containing the template of the security group. Syntax within the file can be the usual attribute=value or XML. update_type There are two ways to update a...
salt/cloud/clouds/opennebula.py
secgroup_update
seblu/salt
2
python
def secgroup_update(call=None, kwargs=None): '\n Replaces the security group template contents.\n\n .. versionadded:: Boron\n\n secgroup_id\n The ID of the security group to update.\n\n path\n The path to a file containing the template of the security group. Syntax\n within the file...
def secgroup_update(call=None, kwargs=None): '\n Replaces the security group template contents.\n\n .. versionadded:: Boron\n\n secgroup_id\n The ID of the security group to update.\n\n path\n The path to a file containing the template of the security group. Syntax\n within the file...
4ffcf474c0dfd87e270308c8aef3b351411c7ef8d5c123a39b7c8cf7e60048b0
def template_allocate(call=None, kwargs=None): '\n Allocates a new template in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the elements of the template to be allocated.\n Syntax within the file can be the usual attribute=value or XML.\n\n CLI Example:\n...
Allocates a new template in OpenNebula. .. versionadded:: Boron 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. CLI Example: .. code-block:: bash salt-cloud -f template_allocate opennebula path=/path/to/tem...
salt/cloud/clouds/opennebula.py
template_allocate
seblu/salt
2
python
def template_allocate(call=None, kwargs=None): '\n Allocates a new template in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the elements of the template to be allocated.\n Syntax within the file can be the usual attribute=value or XML.\n\n CLI Example:\n...
def template_allocate(call=None, kwargs=None): '\n Allocates a new template in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file containing the elements of the template to be allocated.\n Syntax within the file can be the usual attribute=value or XML.\n\n CLI Example:\n...
fd054366366391c499d09bb572c946df3d30f8432659137118c9951769f451ca
def template_clone(call=None, kwargs=None): '\n Clones an existing virtual machine template.\n\n .. versionadded:: Boron\n\n name\n The name of the new template.\n\n template_id\n The ID of the template to be cloned.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f ...
Clones an existing virtual machine template. .. versionadded:: Boron name The name of the new template. template_id The ID of the template to be cloned. CLI Example: .. code-block:: bash salt-cloud -f template_clone opennebula name=my-cloned-template template_id=0
salt/cloud/clouds/opennebula.py
template_clone
seblu/salt
2
python
def template_clone(call=None, kwargs=None): '\n Clones an existing virtual machine template.\n\n .. versionadded:: Boron\n\n name\n The name of the new template.\n\n template_id\n The ID of the template to be cloned.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f ...
def template_clone(call=None, kwargs=None): '\n Clones an existing virtual machine template.\n\n .. versionadded:: Boron\n\n name\n The name of the new template.\n\n template_id\n The ID of the template to be cloned.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-cloud -f ...
00a4a3d51024c3298eba9c3c7b07bf45ddc747cded308bbd2629908f44331ffb
def template_delete(call=None, kwargs=None): '\n Deletes the given template from OpenNebula. Either a name or a template_id must\n be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the template to delete.\n\n template_id\n The ID of the template to delete.\n\n CLI Examp...
Deletes the given template from OpenNebula. Either a name or a template_id must be supplied. .. versionadded:: Boron name The name of the template to delete. template_id The ID of the template to delete. CLI Example: .. code-block:: bash salt-cloud -f template_delete opennebula name=my-template sa...
salt/cloud/clouds/opennebula.py
template_delete
seblu/salt
2
python
def template_delete(call=None, kwargs=None): '\n Deletes the given template from OpenNebula. Either a name or a template_id must\n be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the template to delete.\n\n template_id\n The ID of the template to delete.\n\n CLI Examp...
def template_delete(call=None, kwargs=None): '\n Deletes the given template from OpenNebula. Either a name or a template_id must\n be supplied.\n\n .. versionadded:: Boron\n\n name\n The name of the template to delete.\n\n template_id\n The ID of the template to delete.\n\n CLI Examp...
f43e50330fa6d4d2d75e84e64b8c170109d0f2d38fa578b93122ba192810ca8a
def template_instantiate(call=None, kwargs=None): '\n Instantiates a new virtual machine from a template.\n\n .. versionadded:: Boron\n\n .. note::\n ``template_instantiate`` creates a VM on OpenNebula from a template, but it\n does not install Salt on the new VM. Use the ``create`` function ...
Instantiates a new virtual machine from a template. .. versionadded:: Boron .. 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-profile vm-name``. vm_name ...
salt/cloud/clouds/opennebula.py
template_instantiate
seblu/salt
2
python
def template_instantiate(call=None, kwargs=None): '\n Instantiates a new virtual machine from a template.\n\n .. versionadded:: Boron\n\n .. note::\n ``template_instantiate`` creates a VM on OpenNebula from a template, but it\n does not install Salt on the new VM. Use the ``create`` function ...
def template_instantiate(call=None, kwargs=None): '\n Instantiates a new virtual machine from a template.\n\n .. versionadded:: Boron\n\n .. note::\n ``template_instantiate`` creates a VM on OpenNebula from a template, but it\n does not install Salt on the new VM. Use the ``create`` function ...
b7b9a859e37642cac182eb5d4d2c44f9f11a76be65e0f5c3e957ec7706cd4b1b
def vm_action(name, kwargs=None, call=None): "\n Submits an action to be performed on a given virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to action.\n\n action\n The action to be performed on the VM. Available options include:\n - boot\n - d...
Submits an action to be performed on a given virtual machine. .. versionadded:: Boron 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 - poweroff - poweroff-hard - rebo...
salt/cloud/clouds/opennebula.py
vm_action
seblu/salt
2
python
def vm_action(name, kwargs=None, call=None): "\n Submits an action to be performed on a given virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to action.\n\n action\n The action to be performed on the VM. Available options include:\n - boot\n - d...
def vm_action(name, kwargs=None, call=None): "\n Submits an action to be performed on a given virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to action.\n\n action\n The action to be performed on the VM. Available options include:\n - boot\n - d...
3127da808207852d8c81cfbb804f3d6f505adfae752b60f87ed35c4de9bc5ac0
def vm_allocate(call=None, kwargs=None): '\n Allocates a new virtual machine in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file defining the template of the VM to allocate.\n Syntax within the file can be the usual attribute=value or XML.\n\n hold\n If this par...
Allocates a new virtual machine in OpenNebula. .. versionadded:: Boron 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. hold If this parameter is set to ``True``, the VM will be created in the ``HOLD`` state. If not s...
salt/cloud/clouds/opennebula.py
vm_allocate
seblu/salt
2
python
def vm_allocate(call=None, kwargs=None): '\n Allocates a new virtual machine in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file defining the template of the VM to allocate.\n Syntax within the file can be the usual attribute=value or XML.\n\n hold\n If this par...
def vm_allocate(call=None, kwargs=None): '\n Allocates a new virtual machine in OpenNebula.\n\n .. versionadded:: Boron\n\n path\n The path to a file defining the template of the VM to allocate.\n Syntax within the file can be the usual attribute=value or XML.\n\n hold\n If this par...
1766f7d537f6720264035915c31173435fdc33dbfe8bb3dba84a5ceb33348d1d
def vm_attach(name, kwargs=None, call=None): '\n Attaches a new disk to the given virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM for which to attach the new disk.\n\n path\n The path to a file containing a single DISK vector attribute.\n Syntax within the...
Attaches a new disk to the given virtual machine. .. versionadded:: Boron 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. CLI Example: .. code-block:: bash s...
salt/cloud/clouds/opennebula.py
vm_attach
seblu/salt
2
python
def vm_attach(name, kwargs=None, call=None): '\n Attaches a new disk to the given virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM for which to attach the new disk.\n\n path\n The path to a file containing a single DISK vector attribute.\n Syntax within the...
def vm_attach(name, kwargs=None, call=None): '\n Attaches a new disk to the given virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM for which to attach the new disk.\n\n path\n The path to a file containing a single DISK vector attribute.\n Syntax within the...
2991b4f979571e048cf079acd958f1663249bf648cdb3d11cc59fe89eff11e37
def vm_attachnic(name, kwargs=None, call=None): '\n Attaches a new network interface to the given virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM for which to attach the new network interface.\n\n path\n The path to a file containing a single NIC vector attribute...
Attaches a new network interface to the given virtual machine. .. versionadded:: Boron name The name of the VM for which to attach the new network interface. path The path to a file containing a single NIC vector attribute. Syntax within the file can be the usual attribute=value or XML. CLI Example: .....
salt/cloud/clouds/opennebula.py
vm_attachnic
seblu/salt
2
python
def vm_attachnic(name, kwargs=None, call=None): '\n Attaches a new network interface to the given virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM for which to attach the new network interface.\n\n path\n The path to a file containing a single NIC vector attribute...
def vm_attachnic(name, kwargs=None, call=None): '\n Attaches a new network interface to the given virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM for which to attach the new network interface.\n\n path\n The path to a file containing a single NIC vector attribute...
e4870e61a12bd650cf3ea7f122921d86555261eb3cb2cf8556bf080deaccf965
def vm_deploy(name, kwargs=None, call=None): '\n Initiates the instance of the given VM on the target host.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to deploy.\n\n host_id\n The ID of the target host where the VM will be deployed.\n\n capacity_maintained\n True t...
Initiates the instance of the given VM on the target host. .. versionadded:: Boron name The name of the VM to deploy. host_id The ID of the target host where the VM will be deployed. capacity_maintained True to enforce the Host capacity is not over-committed. This parameter is only acknowledged for ...
salt/cloud/clouds/opennebula.py
vm_deploy
seblu/salt
2
python
def vm_deploy(name, kwargs=None, call=None): '\n Initiates the instance of the given VM on the target host.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to deploy.\n\n host_id\n The ID of the target host where the VM will be deployed.\n\n capacity_maintained\n True t...
def vm_deploy(name, kwargs=None, call=None): '\n Initiates the instance of the given VM on the target host.\n\n .. versionadded:: Boron\n\n name\n The name of the VM to deploy.\n\n host_id\n The ID of the target host where the VM will be deployed.\n\n capacity_maintained\n True t...
fab75cb814a68ba846d34d251189b847d53b643118cb9d5ef16bb3d1ad2ba6c7
def vm_detach(name, kwargs=None, call=None): '\n Detaches a disk from a virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM from which to detach the disk.\n\n disk_id\n The ID of the disk to detach.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-clou...
Detaches a disk from a virtual machine. .. versionadded:: Boron name The name of the VM from which to detach the disk. disk_id The ID of the disk to detach. CLI Example: .. code-block:: bash salt-cloud -a vm_detach my-vm disk_id=1
salt/cloud/clouds/opennebula.py
vm_detach
seblu/salt
2
python
def vm_detach(name, kwargs=None, call=None): '\n Detaches a disk from a virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM from which to detach the disk.\n\n disk_id\n The ID of the disk to detach.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-clou...
def vm_detach(name, kwargs=None, call=None): '\n Detaches a disk from a virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM from which to detach the disk.\n\n disk_id\n The ID of the disk to detach.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt-clou...
26f8e472bcdedb67bde93f3e87f1c7d3183d571b0156999cc6d539e58bb660a8
def vm_detachnic(name, kwargs=None, call=None): '\n Detaches a disk from a virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM from which to detach the network interface.\n\n nic_id\n The ID of the nic to detach.\n\n CLI Example:\n\n .. code-block:: bash\n\n ...
Detaches a disk from a virtual machine. .. versionadded:: Boron name The name of the VM from which to detach the network interface. nic_id The ID of the nic to detach. CLI Example: .. code-block:: bash salt-cloud -a vm_detachnic my-vm nic_id=1
salt/cloud/clouds/opennebula.py
vm_detachnic
seblu/salt
2
python
def vm_detachnic(name, kwargs=None, call=None): '\n Detaches a disk from a virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM from which to detach the network interface.\n\n nic_id\n The ID of the nic to detach.\n\n CLI Example:\n\n .. code-block:: bash\n\n ...
def vm_detachnic(name, kwargs=None, call=None): '\n Detaches a disk from a virtual machine.\n\n .. versionadded:: Boron\n\n name\n The name of the VM from which to detach the network interface.\n\n nic_id\n The ID of the nic to detach.\n\n CLI Example:\n\n .. code-block:: bash\n\n ...
718bf6e37a078550c52ae59cd70cac907d7b2aa87de6ae48f4450c02e79b0f18
def vm_disk_save(name, kwargs=None, call=None): '\n Sets the disk to be saved in the given image.\n\n .. versionadded:: Boron\n\n name\n The name of the VM containing the disk to save.\n\n disk_id\n The ID of the disk to save.\n\n image_name\n The name of the new image where the ...
Sets the disk to be saved in the given image. .. versionadded:: Boron 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 image. If not set, then the default ``ONE...
salt/cloud/clouds/opennebula.py
vm_disk_save
seblu/salt
2
python
def vm_disk_save(name, kwargs=None, call=None): '\n Sets the disk to be saved in the given image.\n\n .. versionadded:: Boron\n\n name\n The name of the VM containing the disk to save.\n\n disk_id\n The ID of the disk to save.\n\n image_name\n The name of the new image where the ...
def vm_disk_save(name, kwargs=None, call=None): '\n Sets the disk to be saved in the given image.\n\n .. versionadded:: Boron\n\n name\n The name of the VM containing the disk to save.\n\n disk_id\n The ID of the disk to save.\n\n image_name\n The name of the new image where the ...
3826b3e9daa5fca29f1e5f45c95e46fd2a9c8740c7d3ef79182bdc4b1ca4fb0b
def vm_disk_snapshot_create(name, kwargs=None, call=None): '\n Takes a new snapshot of the disk image.\n\n .. versionadded:: Boron\n\n name\n The name of the VM of which to take the snapshot.\n\n disk_id\n The ID of the disk to save.\n\n description\n The description for the snap...
Takes a new snapshot of the disk image. .. versionadded:: Boron 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_disk_snapshot_create my-vm disk_id=0 descript...
salt/cloud/clouds/opennebula.py
vm_disk_snapshot_create
seblu/salt
2
python
def vm_disk_snapshot_create(name, kwargs=None, call=None): '\n Takes a new snapshot of the disk image.\n\n .. versionadded:: Boron\n\n name\n The name of the VM of which to take the snapshot.\n\n disk_id\n The ID of the disk to save.\n\n description\n The description for the snap...
def vm_disk_snapshot_create(name, kwargs=None, call=None): '\n Takes a new snapshot of the disk image.\n\n .. versionadded:: Boron\n\n name\n The name of the VM of which to take the snapshot.\n\n disk_id\n The ID of the disk to save.\n\n description\n The description for the snap...