Skip to content

Commit

Permalink
[src] - adding 13 azure endpoints (#54)
Browse files Browse the repository at this point in the history
* [src] - adding 13 azure endpoints

* [src] - update travis
  • Loading branch information
Jeffrey Noehren authored and kmcgrath committed Mar 1, 2019
1 parent a67094b commit e0971dd
Show file tree
Hide file tree
Showing 23 changed files with 1,275 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ python:
install:
- pip install coveralls PyYaml requests mock pydoc-markdown
script:
- coverage run --source spotinst_sdk setup.py test
- coverage run --source spotinst_sdk2 setup.py test
after_success:
coveralls
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.1.1] - 2019-02-29
### Added
- last 13 Azure endpoints

## [2.0.1] - 2019-02-24
### Updated
- Changed single client to multiple clients
- Added Session object
- Moved models to /models dir

### Added
- gcp client with all endpoints
- azure client with 5/18 endpoints

## [1.0.44] - 2019-02-04
### Added
- Event subscription endpoints
Expand Down
210 changes: 210 additions & 0 deletions docs/pydocmd/clients/elastigroup/elastigroup_azure_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,213 @@ __Returns__

`(List)`: List of Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.roll_group">roll_group</h2>

```python
ElastigroupAzureClient.roll_group(self, group_id, group_roll)
```

Roll an elastigroup

__Arguments__

- __group_id (String)__: Elastigroup ID
- __group_roll (ElastigroupRoll)__: GroupRoll Object

__Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.get_all_group_deployment">get_all_group_deployment</h2>

```python
ElastigroupAzureClient.get_all_group_deployment(self, group_id)
```

get all group deployment from an elastigroup

__Arguments__

- __group_id (String)__: Elastigroup ID

__Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.get_deployment_status">get_deployment_status</h2>

```python
ElastigroupAzureClient.get_deployment_status(self, group_id, roll_id)
```

get all a deployment status from an elastigroup

__Arguments__

- __group_id (String)__: Elastigroup ID
- __roll_id (String)__: Deployment ID

__Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.stop_deployment">stop_deployment</h2>

```python
ElastigroupAzureClient.stop_deployment(self, group_id, roll_id)
```

stop a deployment from an elastigroup

__Arguments__

- __group_id (String)__: Elastigroup ID
- __roll_id (String)__: Deployment ID

__Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.scale_elastigroup_up">scale_elastigroup_up</h2>

```python
ElastigroupAzureClient.scale_elastigroup_up(self, group_id, adjustment)
```

Scale up an elastigroup

__Arguments__

- __group_id (String)__: Elastigroup ID
- __adjustment (int)__: Ammount to scale group

__Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.scale_elastigroup_down">scale_elastigroup_down</h2>

```python
ElastigroupAzureClient.scale_elastigroup_down(self, group_id, adjustment)
```

Scale down an elastigroup

__Arguments__

- __group_id (String)__: Elastigroup ID
- __adjustment (int)__: Ammount to scale group

__Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.create_task">create_task</h2>

```python
ElastigroupAzureClient.create_task(self, task)
```

Create a scheduling task

__Arguments__

- __task (Task)__: Task Object

__Returns__

`(Object)`: Task API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.update_task">update_task</h2>

```python
ElastigroupAzureClient.update_task(self, task_update, task_id)
```

Update a scheduling Task

__Arguments__

- __task_id (String)__: Task ID
- __task_update (Elastigroup)__: Task Object

__Returns__

`(Object)`: Task API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.get_task">get_task</h2>

```python
ElastigroupAzureClient.get_task(self, task_id)
```

Get a Task

__Arguments__

- __task_id(String)__: Task ID

__Returns__

`(Object)`: Task API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.get_all_tasks">get_all_tasks</h2>

```python
ElastigroupAzureClient.get_all_tasks(self)
```

Get all Tasks
__Returns__

`(Object)`: Task API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.delete_task">delete_task</h2>

```python
ElastigroupAzureClient.delete_task(self, task_id)
```

Delete a scheduling task

__Arguments__

- __task_id (String)__: Task ID

__Returns__

`(Object)`: Task API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.get_elastigroup_active_instances">get_elastigroup_active_instances</h2>

```python
ElastigroupAzureClient.get_elastigroup_active_instances(self, group_id)
```

Get active instances of an elastigroup

__Arguments__

- __group_id (String)__: Elastigroup ID

__Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAzureClient.detach_elastigroup_instances">detach_elastigroup_instances</h2>

```python
ElastigroupAzureClient.detach_elastigroup_instances(self, group_id, detach_configuration)
```

Detatch instances from an elastigroup

__Arguments__

- __group_id (String)__: Elastigroup ID
- __detatch_configuration (Detach)__: Detach Object

__Returns__

`(Object)`: Elastigroup API response

69 changes: 66 additions & 3 deletions docs/pydocmd/models/elastigroup/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,12 @@ Scheduling(self, tasks='d3043820717d74d9a17694c176d39733')

__Arguments__

- __tasks__: list[Task]
- __tasks__: list[SchedulingTask]

<h2 id="spotinst_sdk2.models.elastigroup.azure.Task">Task</h2>
<h2 id="spotinst_sdk2.models.elastigroup.azure.SchedulingTask">SchedulingTask</h2>

```python
Task(self, is_enabled='d3043820717d74d9a17694c176d39733', cron_expression='d3043820717d74d9a17694c176d39733', task_type='d3043820717d74d9a17694c176d39733', scale_target_capacity='d3043820717d74d9a17694c176d39733', scale_min_capacity='d3043820717d74d9a17694c176d39733', scale_max_capacity='d3043820717d74d9a17694c176d39733', batch_size_percentage='d3043820717d74d9a17694c176d39733', grace_period='d3043820717d74d9a17694c176d39733', adjustment='d3043820717d74d9a17694c176d39733', adjustment_percentage='d3043820717d74d9a17694c176d39733')
SchedulingTask(self, is_enabled='d3043820717d74d9a17694c176d39733', cron_expression='d3043820717d74d9a17694c176d39733', task_type='d3043820717d74d9a17694c176d39733', scale_target_capacity='d3043820717d74d9a17694c176d39733', scale_min_capacity='d3043820717d74d9a17694c176d39733', scale_max_capacity='d3043820717d74d9a17694c176d39733', batch_size_percentage='d3043820717d74d9a17694c176d39733', grace_period='d3043820717d74d9a17694c176d39733', adjustment='d3043820717d74d9a17694c176d39733', adjustment_percentage='d3043820717d74d9a17694c176d39733')
```

__Arguments__
Expand Down Expand Up @@ -360,3 +360,66 @@ __Arguments__

- __cluster_identifier__: str

<h2 id="spotinst_sdk2.models.elastigroup.azure.RollGroup">RollGroup</h2>

```python
RollGroup(self, batch_size_percentage='d3043820717d74d9a17694c176d39733', grace_period='d3043820717d74d9a17694c176d39733', health_check_type='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __batch_size_percentage__: int
- __grace_period__: int
- __health_check_type__: str

<h2 id="spotinst_sdk2.models.elastigroup.azure.DetachConfiguration">DetachConfiguration</h2>

```python
DetachConfiguration(self, instances_to_detach='d3043820717d74d9a17694c176d39733', draining_timeout='d3043820717d74d9a17694c176d39733', should_decrement_target_capacity='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __instances_to_detach__: list[str]
- __draining_timeout__: int
- __should_decrement_target_capacity__: bool

<h1 id="spotinst_sdk2.models.elastigroup.azure.task">spotinst_sdk2.models.elastigroup.azure.task</h1>


<h2 id="spotinst_sdk2.models.elastigroup.azure.task.Task">Task</h2>

```python
Task(self, name='d3043820717d74d9a17694c176d39733', description='d3043820717d74d9a17694c176d39733', state='d3043820717d74d9a17694c176d39733', policies='d3043820717d74d9a17694c176d39733', instances='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __name__: str
- __description__: str
- __state__: str
- __policies__: list[Policy]
- __instances__: list[Instance]

<h2 id="spotinst_sdk2.models.elastigroup.azure.task.Policy">Policy</h2>

```python
Policy(self, cron='d3043820717d74d9a17694c176d39733', action='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __cron__: str
- __action__: str

<h2 id="spotinst_sdk2.models.elastigroup.azure.task.Instance">Instance</h2>

```python
Instance(self, vm_name='d3043820717d74d9a17694c176d39733', resource_group_name='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __vm_name__: str
- __resource_group_name__: str

4 changes: 2 additions & 2 deletions docs/pydocmd/models/elastigroup/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ ScalingPolicyAction(self, scaling_type='d3043820717d74d9a17694c176d39733', adjus

__Arguments__

- __type__: str
- __scaling_type__: str
- __adjustment__: int

<h2 id="spotinst_sdk2.models.elastigroup.gcp.ThirdPartiesIntegration">ThirdPartiesIntegration</h2>
Expand Down Expand Up @@ -350,7 +350,7 @@ Gpu(self, gpu_type='d3043820717d74d9a17694c176d39733', count='d3043820717d74d9a1

__Arguments__

- __type__: str
- __gpu_type__: str
- __count__: int

<h2 id="spotinst_sdk2.models.elastigroup.gcp.Health">Health</h2>
Expand Down
1 change: 1 addition & 0 deletions pydocmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ generate:
- spotinst_sdk2.models.elastigroup.gcp.gke++
- models/elastigroup/azure.md:
- spotinst_sdk2.models.elastigroup.azure++
- spotinst_sdk2.models.elastigroup.azure.task++
- models/functions.md:
- spotinst_sdk2.models.functions++
- models/mlb.md:
Expand Down
Loading

0 comments on commit e0971dd

Please sign in to comment.