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

Commit 05218d1

Browse files
committed
Updated method doc string and example file
1 parent d6b7179 commit 05218d1

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

examples/server_profiles.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,6 @@
116116
path="/templateCompliance", value="Compliant")
117117
pprint(profile.data)
118118

119-
if oneview_client.api_version <= 500:
120-
# Retrieve ServerProfile schema
121-
# This method available only for API version <= 500
122-
print("\nRetrieve the generated ServerProfile schema")
123-
schema = profile.get_schema()
124-
pprint(schema)
125-
126119
# Server profile compliance preview
127120
print("\nGets the preview of manual and automatic updates required to make the server profile consistent "
128121
"with its template.")
@@ -186,6 +179,8 @@
186179
pprint(available_networks)
187180

188181
# Get the all Ethernet networks associated with a server hardware type, enclosure group and scopeuris
182+
# This method works with all the API versions but the scope_uris param is available
183+
# with API version 600 and above
189184
if oneview_client.api_version >= 600:
190185
available_networks = server_profiles.get_available_networks(
191186
enclosureGroupUri=enclosure_group.data["uri"],

hpOneView/resources/servers/server_profiles.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ def get_available_servers(self, **kwargs):
242242
profileUri (str): The URI of the server profile resource.
243243
scopeUris (str): An expression to restrict the resources returned according to
244244
the scopes to which they are assigned.
245-
245+
filter (list or str): A general filter/query string to narrow the list of items returned.
246+
The default is no filter, all resources are returned.
246247
Returns:
247248
list: Available servers.
248249
"""
@@ -309,6 +310,8 @@ def get_available_targets(self, **kwargs):
309310
profileUri (str): The URI of the server profile associated with the resource.
310311
scopeUris (str): An expression to restrict the resources returned according to
311312
the scopes to which they are assigned.
313+
filter (list or str): A general filter/query string to narrow the list of items returned.
314+
The default is no filter, all resources are returned.
312315
313316
Returns:
314317
list: List of available servers and bays.

0 commit comments

Comments
 (0)