Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 112a55b

Browse files
committed
Updated method doc string for added parameters.
1 parent a7c8c53 commit 112a55b

File tree

4 files changed

+47
-47
lines changed

4 files changed

+47
-47
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Extends support of the SDK to OneView Rest API version 600 (OneView v4.0).
2424
- Server hardware
2525
- Server profile template
2626
- Switch
27+
- Server profile
2728
- Switch type
2829
- Tasks
2930
- Uplink set

endpoints-support.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -447,23 +447,23 @@
447447
|<sub>/rest/server-profile-templates/{id}/transformation</sub> | GET | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark:
448448
|<sub>/rest/server-profile-templates/available-networks</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark:
449449
| **Server Profiles** |
450-
|<sub>/rest/server-profiles</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
451-
|<sub>/rest/server-profiles</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: |
452-
|<sub>/rest/server-profiles</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: |
453-
|<sub>/rest/server-profiles/available-networks</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
454-
|<sub>/rest/server-profiles/available-servers</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
455-
|<sub>/rest/server-profiles/available-storage-system</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
456-
|<sub>/rest/server-profiles/available-storage-systems</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
457-
|<sub>/rest/server-profiles/available-targets</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
458-
|<sub>/rest/server-profiles/profile-ports</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
459-
|<sub>/rest/server-profiles/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
460-
|<sub>/rest/server-profiles/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: |
461-
|<sub>/rest/server-profiles/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: |
462-
|<sub>/rest/server-profiles/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: |
463-
|<sub>/rest/server-profiles/{id}/compliance-preview</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
464-
|<sub>/rest/server-profiles/{id}/new-profile-template</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |
465-
|<sub>/rest/server-profiles/{id}/messages</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
466-
|<sub>/rest/server-profiles/{id}/transformation</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
450+
|<sub>/rest/server-profiles</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
451+
|<sub>/rest/server-profiles</sub> | POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
452+
|<sub>/rest/server-profiles</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
453+
|<sub>/rest/server-profiles/available-networks</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
454+
|<sub>/rest/server-profiles/available-servers</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
455+
|<sub>/rest/server-profiles/available-storage-system</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign:
456+
|<sub>/rest/server-profiles/available-storage-systems</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign:
457+
|<sub>/rest/server-profiles/available-targets</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
458+
|<sub>/rest/server-profiles/profile-ports</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
459+
|<sub>/rest/server-profiles/{id}</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
460+
|<sub>/rest/server-profiles/{id}</sub> | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
461+
|<sub>/rest/server-profiles/{id}</sub> | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
462+
|<sub>/rest/server-profiles/{id}</sub> | PATCH | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
463+
|<sub>/rest/server-profiles/{id}/compliance-preview</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
464+
|<sub>/rest/server-profiles/{id}/new-profile-template</sub> | GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark:
465+
|<sub>/rest/server-profiles/{id}/messages</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_minus_sign:
466+
|<sub>/rest/server-profiles/{id}/transformation</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark:
467467
| **Storage Pools** |
468468
|<sub>/rest/storage-pools</sub> | GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
469469
|<sub>/rest/storage-pools</sub> | POST | :white_check_mark: | :white_check_mark: | :heavy_minus_sign: |

examples/server_profiles.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@
109109
profile = oneview_client.server_profiles.get(profile_uri)
110110
pprint(profile)
111111

112-
# Retrieve ServerProfile schema
113-
print("\nRetrieve the generated ServerProfile schema")
114-
schema = oneview_client.server_profiles.get_schema()
115-
pprint(schema)
112+
if oneview_client.api_version <= 500:
113+
# Retrieve ServerProfile schema
114+
# This method available only for API version <= 500
115+
print("\nRetrieve the generated ServerProfile schema")
116+
schema = oneview_client.server_profiles.get_schema()
117+
pprint(schema)
116118

117119
try:
118120
# Server profile compliance preview

hpOneView/resources/servers/server_profiles.py

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def create(self, resource, timeout=-1, force=''):
6161
resource (dict): Object to create.
6262
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
6363
in OneView, just stop waiting for its completion.
64-
force (Query Parameter): Comma separated list of flags for ignoring specific warning.
64+
force: Comma separated list of flags for ignoring specific warning.
6565
6666
Returns:
6767
dict: Created server profile.
@@ -76,7 +76,7 @@ def update(self, resource, id_or_uri, force=''):
7676
Args:
7777
id_or_uri: Can be either the server profile id or the server profile uri.
7878
resource (dict): Object to update.
79-
force (Query Parameter): Comma separated list of flags for ignoring specific warning.
79+
force: Comma separated list of flags for ignoring specific warning.
8080
8181
Returns:
8282
dict: The server profile resource.
@@ -312,24 +312,23 @@ def get_available_networks(self, **kwargs):
312312
server profile, along with their respective ports.
313313
314314
Args:
315-
enclosureGroupUri (str):
316-
The URI of the enclosure group associated with the resource.
317-
functionType (str):
318-
The FunctionType (Ethernet or FibreChannel) to filter the list of networks returned.
319-
serverHardwareTypeUri (str):
320-
The URI of the server hardware type associated with the resource.
321-
serverHardwareUri (str):
322-
The URI of the server hardware associated with the resource.
323-
view (str):
324-
Returns a specific subset of the attributes of the resource or collection, by specifying the name of a
325-
predefined view. The default view is expand (show all attributes of the resource and all elements of
326-
collections of resources).
315+
enclosureGroupUri (str): The URI of the enclosure group associated with the resource.
316+
functionType (str): The FunctionType (Ethernet or FibreChannel) to filter the list of networks returned.
317+
serverHardwareTypeUri (str): The URI of the server hardware type associated with the resource.
318+
serverHardwareUri (str): The URI of the server hardware associated with the resource.
319+
view (str): Returns a specific subset of the attributes of the resource or collection, by
320+
specifying the name of a predefined view. The default view is expand (show all attributes
321+
of the resource and all elements of collections of resources).
327322
328323
Values:
329324
Ethernet
330325
Specifies that the connection is to an Ethernet network or a network set.
331326
FibreChannel
332327
Specifies that the connection is to a Fibre Channel network.
328+
profileUri (str): If the URI of the server profile is provided the list of available networks will
329+
include only networks that share a scope with the server profile.
330+
scopeUris (str): An expression to restrict the resources returned according to the scopes
331+
to which they are assigned
333332
334333
Returns:
335334
list: Available networks.
@@ -342,12 +341,11 @@ def get_available_servers(self, **kwargs):
342341
Retrieves the list of available servers.
343342
344343
Args:
345-
enclosureGroupUri (str):
346-
The URI of the enclosure group associated with the resource.
347-
serverHardwareTypeUri (str):
348-
The URI of the server hardware type associated with the resource.
349-
profileUri (str):
350-
The URI of the server profile resource.
344+
enclosureGroupUri (str): The URI of the enclosure group associated with the resource.
345+
serverHardwareTypeUri (str): The URI of the server hardware type associated with the resource.
346+
profileUri (str): The URI of the server profile resource.
347+
scopeUris (str): An expression to restrict the resources returned according to
348+
the scopes to which they are assigned.
351349
352350
Returns:
353351
list: Available servers.
@@ -410,12 +408,11 @@ def get_available_targets(self, **kwargs):
410408
profile.
411409
412410
Args:
413-
enclosureGroupUri (str):
414-
The URI of the enclosure group associated with the resource.
415-
serverHardwareTypeUri (str):
416-
The URI of the server hardware type associated with the resource.
417-
profileUri (str):
418-
The URI of the server profile associated with the resource.
411+
enclosureGroupUri (str): The URI of the enclosure group associated with the resource.
412+
serverHardwareTypeUri (str): The URI of the server hardware type associated with the resource.
413+
profileUri (str): The URI of the server profile associated with the resource.
414+
scopeUris (str): An expression to restrict the resources returned according to
415+
the scopes to which they are assigned.
419416
420417
Returns:
421418
list: List of available servers and bays.

0 commit comments

Comments
 (0)