Skip to content

Commit

Permalink
API1600 Deployment Plan
Browse files Browse the repository at this point in the history
  • Loading branch information
nabhajit-ray committed May 14, 2020
1 parent 817c03d commit 0764271
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Extends support of the SDK to OneView REST API version 1600 (OneView v5.20).

#### Features supported with the current release
- Certificates Server
- Deployment plan
- Enclosures
- Ethernet network
- FC network
Expand Down
18 changes: 9 additions & 9 deletions endpoints-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,13 @@

## HPE Synergy Image Streamer

| Endpoints | Verb | V800 | V1000 | V1020
| ------------------------------------------------------------------------------ | ---------------- | :------------------: | :------------------: | :------------------: |
| Endpoints | Verb | V800 | V1000 | V1020 | V1600
| ------------------------------------------------------------------------------ | ---------------- | :------------------: | :------------------: | :------------------: | :------------------: |
| **Deployment Plans**
|<sub> /rest/deployment-plans </sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans </sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id} </sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id} </sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id} </sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id}/usedby </sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id}/osdp </sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans </sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans </sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id} </sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id} </sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id} </sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id}/usedby </sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|<sub> /rest/deployment-plans/{id}/osdp </sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
14 changes: 8 additions & 6 deletions hpOneView/image_streamer/resources/deployment_plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,24 @@ def create(self, resource, timeout=-1):

return super(DeploymentPlans, self).create(data, timeout=timeout)

def get_osdp(self):
def get_osdp(self, uri_or_id=None):
"""
Retrieves facts about Server Profiles and Server Profile Templates that are using Deployment Plan based on the ID or URI provided.
Returns:
dict: Server Profiles and Server Profile Templates
"""
uri = "{}/osdp".format(self.data["uri"])
return self._helper.do_get(uri)
if uri_or_id is None:
uri_or_id = "{}/osdp".format(self.data["uri"])
return self._helper.do_get(uri_or_id)

def get_usedby(self):
def get_usedby(self,uri_or_id=None):
"""
Retrieves the OS deployment plan details from OneView for a deployment plan resource based on the ID or URI provided.
Returns:
dict: The OS Deployment Plan.
"""
uri = "{}/usedby".format(self.data["uri"])
return self._helper.do_get(uri)
if uri_or_id is None:
uri_or_id = "{}/usedby".format(self.data["uri"])
return self._helper.do_get(uri_or_id)

0 comments on commit 0764271

Please sign in to comment.