id int32 0 252k | repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 |
|---|---|---|---|---|---|---|---|---|---|---|---|
18,500 | hendrix/hendrix | hendrix/experience/hey_joe.py | _ParticipantRegistry.remove | def remove(self, participant):
"""
Unsubscribe this participant from all topic to which it is subscribed.
"""
for topic, participants in list(self._participants_by_topic.items()):
self.unsubscribe(participant, topic)
# It's possible that we just nixe the last subs... | python | def remove(self, participant):
"""
Unsubscribe this participant from all topic to which it is subscribed.
"""
for topic, participants in list(self._participants_by_topic.items()):
self.unsubscribe(participant, topic)
# It's possible that we just nixe the last subs... | [
"def",
"remove",
"(",
"self",
",",
"participant",
")",
":",
"for",
"topic",
",",
"participants",
"in",
"list",
"(",
"self",
".",
"_participants_by_topic",
".",
"items",
"(",
")",
")",
":",
"self",
".",
"unsubscribe",
"(",
"participant",
",",
"topic",
")"... | Unsubscribe this participant from all topic to which it is subscribed. | [
"Unsubscribe",
"this",
"participant",
"from",
"all",
"topic",
"to",
"which",
"it",
"is",
"subscribed",
"."
] | 175af011a7e5822b772bfec0e11a46466bb8688d | https://github.com/hendrix/hendrix/blob/175af011a7e5822b772bfec0e11a46466bb8688d/hendrix/experience/hey_joe.py#L67-L75 |
18,501 | hendrix/hendrix | hendrix/deploy/tls.py | HendrixDeployTLS.addSSLService | def addSSLService(self):
"adds a SSLService to the instaitated HendrixService"
https_port = self.options['https_port']
self.tls_service = HendrixTCPServiceWithTLS(https_port, self.hendrix.site, self.key, self.cert,
self.context_factory, self.co... | python | def addSSLService(self):
"adds a SSLService to the instaitated HendrixService"
https_port = self.options['https_port']
self.tls_service = HendrixTCPServiceWithTLS(https_port, self.hendrix.site, self.key, self.cert,
self.context_factory, self.co... | [
"def",
"addSSLService",
"(",
"self",
")",
":",
"https_port",
"=",
"self",
".",
"options",
"[",
"'https_port'",
"]",
"self",
".",
"tls_service",
"=",
"HendrixTCPServiceWithTLS",
"(",
"https_port",
",",
"self",
".",
"hendrix",
".",
"site",
",",
"self",
".",
... | adds a SSLService to the instaitated HendrixService | [
"adds",
"a",
"SSLService",
"to",
"the",
"instaitated",
"HendrixService"
] | 175af011a7e5822b772bfec0e11a46466bb8688d | https://github.com/hendrix/hendrix/blob/175af011a7e5822b772bfec0e11a46466bb8688d/hendrix/deploy/tls.py#L61-L66 |
18,502 | hendrix/hendrix | hendrix/contrib/cache/backends/memory_cache.py | MemoryCacheBackend.addResource | def addResource(self, content, uri, headers):
"""
Adds the a hendrix.contrib.cache.resource.CachedResource to the
ReverseProxy cache connection
"""
self.cache[uri] = CachedResource(content, headers) | python | def addResource(self, content, uri, headers):
"""
Adds the a hendrix.contrib.cache.resource.CachedResource to the
ReverseProxy cache connection
"""
self.cache[uri] = CachedResource(content, headers) | [
"def",
"addResource",
"(",
"self",
",",
"content",
",",
"uri",
",",
"headers",
")",
":",
"self",
".",
"cache",
"[",
"uri",
"]",
"=",
"CachedResource",
"(",
"content",
",",
"headers",
")"
] | Adds the a hendrix.contrib.cache.resource.CachedResource to the
ReverseProxy cache connection | [
"Adds",
"the",
"a",
"hendrix",
".",
"contrib",
".",
"cache",
".",
"resource",
".",
"CachedResource",
"to",
"the",
"ReverseProxy",
"cache",
"connection"
] | 175af011a7e5822b772bfec0e11a46466bb8688d | https://github.com/hendrix/hendrix/blob/175af011a7e5822b772bfec0e11a46466bb8688d/hendrix/contrib/cache/backends/memory_cache.py#L15-L20 |
18,503 | hendrix/hendrix | hendrix/contrib/cache/__init__.py | decompressBuffer | def decompressBuffer(buffer):
"complements the compressBuffer function in CacheClient"
zbuf = cStringIO.StringIO(buffer)
zfile = gzip.GzipFile(fileobj=zbuf)
deflated = zfile.read()
zfile.close()
return deflated | python | def decompressBuffer(buffer):
"complements the compressBuffer function in CacheClient"
zbuf = cStringIO.StringIO(buffer)
zfile = gzip.GzipFile(fileobj=zbuf)
deflated = zfile.read()
zfile.close()
return deflated | [
"def",
"decompressBuffer",
"(",
"buffer",
")",
":",
"zbuf",
"=",
"cStringIO",
".",
"StringIO",
"(",
"buffer",
")",
"zfile",
"=",
"gzip",
".",
"GzipFile",
"(",
"fileobj",
"=",
"zbuf",
")",
"deflated",
"=",
"zfile",
".",
"read",
"(",
")",
"zfile",
".",
... | complements the compressBuffer function in CacheClient | [
"complements",
"the",
"compressBuffer",
"function",
"in",
"CacheClient"
] | 175af011a7e5822b772bfec0e11a46466bb8688d | https://github.com/hendrix/hendrix/blob/175af011a7e5822b772bfec0e11a46466bb8688d/hendrix/contrib/cache/__init__.py#L30-L36 |
18,504 | hendrix/hendrix | hendrix/contrib/cache/__init__.py | CachedResource.getMaxAge | def getMaxAge(self):
"get the max-age in seconds from the saved headers data"
max_age = 0
cache_control = self.headers.get('cache-control')
if cache_control:
params = dict(urlparse.parse_qsl(cache_control))
max_age = int(params.get('max-age', '0'))
return ... | python | def getMaxAge(self):
"get the max-age in seconds from the saved headers data"
max_age = 0
cache_control = self.headers.get('cache-control')
if cache_control:
params = dict(urlparse.parse_qsl(cache_control))
max_age = int(params.get('max-age', '0'))
return ... | [
"def",
"getMaxAge",
"(",
"self",
")",
":",
"max_age",
"=",
"0",
"cache_control",
"=",
"self",
".",
"headers",
".",
"get",
"(",
"'cache-control'",
")",
"if",
"cache_control",
":",
"params",
"=",
"dict",
"(",
"urlparse",
".",
"parse_qsl",
"(",
"cache_control... | get the max-age in seconds from the saved headers data | [
"get",
"the",
"max",
"-",
"age",
"in",
"seconds",
"from",
"the",
"saved",
"headers",
"data"
] | 175af011a7e5822b772bfec0e11a46466bb8688d | https://github.com/hendrix/hendrix/blob/175af011a7e5822b772bfec0e11a46466bb8688d/hendrix/contrib/cache/__init__.py#L51-L58 |
18,505 | hendrix/hendrix | hendrix/contrib/cache/__init__.py | CachedResource.getLastModified | def getLastModified(self):
"returns the GMT last-modified datetime or None"
last_modified = self.headers.get('last-modified')
if last_modified:
last_modified = self.convertTimeString(last_modified)
return last_modified | python | def getLastModified(self):
"returns the GMT last-modified datetime or None"
last_modified = self.headers.get('last-modified')
if last_modified:
last_modified = self.convertTimeString(last_modified)
return last_modified | [
"def",
"getLastModified",
"(",
"self",
")",
":",
"last_modified",
"=",
"self",
".",
"headers",
".",
"get",
"(",
"'last-modified'",
")",
"if",
"last_modified",
":",
"last_modified",
"=",
"self",
".",
"convertTimeString",
"(",
"last_modified",
")",
"return",
"la... | returns the GMT last-modified datetime or None | [
"returns",
"the",
"GMT",
"last",
"-",
"modified",
"datetime",
"or",
"None"
] | 175af011a7e5822b772bfec0e11a46466bb8688d | https://github.com/hendrix/hendrix/blob/175af011a7e5822b772bfec0e11a46466bb8688d/hendrix/contrib/cache/__init__.py#L68-L73 |
18,506 | hendrix/hendrix | hendrix/contrib/cache/__init__.py | CachedResource.getDate | def getDate(self):
"returns the GMT response datetime or None"
date = self.headers.get('date')
if date:
date = self.convertTimeString(date)
return date | python | def getDate(self):
"returns the GMT response datetime or None"
date = self.headers.get('date')
if date:
date = self.convertTimeString(date)
return date | [
"def",
"getDate",
"(",
"self",
")",
":",
"date",
"=",
"self",
".",
"headers",
".",
"get",
"(",
"'date'",
")",
"if",
"date",
":",
"date",
"=",
"self",
".",
"convertTimeString",
"(",
"date",
")",
"return",
"date"
] | returns the GMT response datetime or None | [
"returns",
"the",
"GMT",
"response",
"datetime",
"or",
"None"
] | 175af011a7e5822b772bfec0e11a46466bb8688d | https://github.com/hendrix/hendrix/blob/175af011a7e5822b772bfec0e11a46466bb8688d/hendrix/contrib/cache/__init__.py#L75-L80 |
18,507 | hendrix/hendrix | hendrix/contrib/cache/__init__.py | CachedResource.isFresh | def isFresh(self):
"returns True if cached object is still fresh"
max_age = self.getMaxAge()
date = self.getDate()
is_fresh = False
if max_age and date:
delta_time = datetime.now() - date
is_fresh = delta_time.total_seconds() < max_age
return is_fr... | python | def isFresh(self):
"returns True if cached object is still fresh"
max_age = self.getMaxAge()
date = self.getDate()
is_fresh = False
if max_age and date:
delta_time = datetime.now() - date
is_fresh = delta_time.total_seconds() < max_age
return is_fr... | [
"def",
"isFresh",
"(",
"self",
")",
":",
"max_age",
"=",
"self",
".",
"getMaxAge",
"(",
")",
"date",
"=",
"self",
".",
"getDate",
"(",
")",
"is_fresh",
"=",
"False",
"if",
"max_age",
"and",
"date",
":",
"delta_time",
"=",
"datetime",
".",
"now",
"(",... | returns True if cached object is still fresh | [
"returns",
"True",
"if",
"cached",
"object",
"is",
"still",
"fresh"
] | 175af011a7e5822b772bfec0e11a46466bb8688d | https://github.com/hendrix/hendrix/blob/175af011a7e5822b772bfec0e11a46466bb8688d/hendrix/contrib/cache/__init__.py#L82-L90 |
18,508 | aio-libs/aiohttp-cors | aiohttp_cors/cors_config.py | _CorsConfigImpl._on_response_prepare | async def _on_response_prepare(self,
request: web.Request,
response: web.StreamResponse):
"""Non-preflight CORS request response processor.
If request is done on CORS-enabled route, process request parameters
and set appropri... | python | async def _on_response_prepare(self,
request: web.Request,
response: web.StreamResponse):
"""Non-preflight CORS request response processor.
If request is done on CORS-enabled route, process request parameters
and set appropri... | [
"async",
"def",
"_on_response_prepare",
"(",
"self",
",",
"request",
":",
"web",
".",
"Request",
",",
"response",
":",
"web",
".",
"StreamResponse",
")",
":",
"if",
"(",
"not",
"self",
".",
"_router_adapter",
".",
"is_cors_enabled_on_request",
"(",
"request",
... | Non-preflight CORS request response processor.
If request is done on CORS-enabled route, process request parameters
and set appropriate CORS response headers. | [
"Non",
"-",
"preflight",
"CORS",
"request",
"response",
"processor",
"."
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/cors_config.py#L141-L195 |
18,509 | aio-libs/aiohttp-cors | aiohttp_cors/resource_options.py | _is_proper_sequence | def _is_proper_sequence(seq):
"""Returns is seq is sequence and not string."""
return (isinstance(seq, collections.abc.Sequence) and
not isinstance(seq, str)) | python | def _is_proper_sequence(seq):
"""Returns is seq is sequence and not string."""
return (isinstance(seq, collections.abc.Sequence) and
not isinstance(seq, str)) | [
"def",
"_is_proper_sequence",
"(",
"seq",
")",
":",
"return",
"(",
"isinstance",
"(",
"seq",
",",
"collections",
".",
"abc",
".",
"Sequence",
")",
"and",
"not",
"isinstance",
"(",
"seq",
",",
"str",
")",
")"
] | Returns is seq is sequence and not string. | [
"Returns",
"is",
"seq",
"is",
"sequence",
"and",
"not",
"string",
"."
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/resource_options.py#L25-L28 |
18,510 | aio-libs/aiohttp-cors | aiohttp_cors/__init__.py | setup | def setup(app: web.Application, *,
defaults: Mapping[str, Union[ResourceOptions,
Mapping[str, Any]]]=None) -> CorsConfig:
"""Setup CORS processing for the application.
To enable CORS for a resource you need to explicitly add route for
that resource using `Co... | python | def setup(app: web.Application, *,
defaults: Mapping[str, Union[ResourceOptions,
Mapping[str, Any]]]=None) -> CorsConfig:
"""Setup CORS processing for the application.
To enable CORS for a resource you need to explicitly add route for
that resource using `Co... | [
"def",
"setup",
"(",
"app",
":",
"web",
".",
"Application",
",",
"*",
",",
"defaults",
":",
"Mapping",
"[",
"str",
",",
"Union",
"[",
"ResourceOptions",
",",
"Mapping",
"[",
"str",
",",
"Any",
"]",
"]",
"]",
"=",
"None",
")",
"->",
"CorsConfig",
":... | Setup CORS processing for the application.
To enable CORS for a resource you need to explicitly add route for
that resource using `CorsConfig.add()` method::
app = aiohttp.web.Application()
cors = aiohttp_cors.setup(app)
cors.add(
app.router.add_route("GET", "/resource", ha... | [
"Setup",
"CORS",
"processing",
"for",
"the",
"application",
"."
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/__init__.py#L40-L67 |
18,511 | aio-libs/aiohttp-cors | aiohttp_cors/preflight_handler.py | _PreflightHandler._parse_request_method | def _parse_request_method(request: web.Request):
"""Parse Access-Control-Request-Method header of the preflight request
"""
method = request.headers.get(hdrs.ACCESS_CONTROL_REQUEST_METHOD)
if method is None:
raise web.HTTPForbidden(
text="CORS preflight reques... | python | def _parse_request_method(request: web.Request):
"""Parse Access-Control-Request-Method header of the preflight request
"""
method = request.headers.get(hdrs.ACCESS_CONTROL_REQUEST_METHOD)
if method is None:
raise web.HTTPForbidden(
text="CORS preflight reques... | [
"def",
"_parse_request_method",
"(",
"request",
":",
"web",
".",
"Request",
")",
":",
"method",
"=",
"request",
".",
"headers",
".",
"get",
"(",
"hdrs",
".",
"ACCESS_CONTROL_REQUEST_METHOD",
")",
"if",
"method",
"is",
"None",
":",
"raise",
"web",
".",
"HTT... | Parse Access-Control-Request-Method header of the preflight request | [
"Parse",
"Access",
"-",
"Control",
"-",
"Request",
"-",
"Method",
"header",
"of",
"the",
"preflight",
"request"
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/preflight_handler.py#L10-L22 |
18,512 | aio-libs/aiohttp-cors | aiohttp_cors/preflight_handler.py | _PreflightHandler._parse_request_headers | def _parse_request_headers(request: web.Request):
"""Parse Access-Control-Request-Headers header or the preflight request
Returns set of headers in upper case.
"""
headers = request.headers.get(hdrs.ACCESS_CONTROL_REQUEST_HEADERS)
if headers is None:
return frozenset... | python | def _parse_request_headers(request: web.Request):
"""Parse Access-Control-Request-Headers header or the preflight request
Returns set of headers in upper case.
"""
headers = request.headers.get(hdrs.ACCESS_CONTROL_REQUEST_HEADERS)
if headers is None:
return frozenset... | [
"def",
"_parse_request_headers",
"(",
"request",
":",
"web",
".",
"Request",
")",
":",
"headers",
"=",
"request",
".",
"headers",
".",
"get",
"(",
"hdrs",
".",
"ACCESS_CONTROL_REQUEST_HEADERS",
")",
"if",
"headers",
"is",
"None",
":",
"return",
"frozenset",
... | Parse Access-Control-Request-Headers header or the preflight request
Returns set of headers in upper case. | [
"Parse",
"Access",
"-",
"Control",
"-",
"Request",
"-",
"Headers",
"header",
"or",
"the",
"preflight",
"request"
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/preflight_handler.py#L25-L40 |
18,513 | aio-libs/aiohttp-cors | aiohttp_cors/preflight_handler.py | _PreflightHandler._preflight_handler | async def _preflight_handler(self, request: web.Request):
"""CORS preflight request handler"""
# Handle according to part 6.2 of the CORS specification.
origin = request.headers.get(hdrs.ORIGIN)
if origin is None:
# Terminate CORS according to CORS 6.2.1.
raise ... | python | async def _preflight_handler(self, request: web.Request):
"""CORS preflight request handler"""
# Handle according to part 6.2 of the CORS specification.
origin = request.headers.get(hdrs.ORIGIN)
if origin is None:
# Terminate CORS according to CORS 6.2.1.
raise ... | [
"async",
"def",
"_preflight_handler",
"(",
"self",
",",
"request",
":",
"web",
".",
"Request",
")",
":",
"# Handle according to part 6.2 of the CORS specification.",
"origin",
"=",
"request",
".",
"headers",
".",
"get",
"(",
"hdrs",
".",
"ORIGIN",
")",
"if",
"or... | CORS preflight request handler | [
"CORS",
"preflight",
"request",
"handler"
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/preflight_handler.py#L45-L130 |
18,514 | aio-libs/aiohttp-cors | aiohttp_cors/urldispatcher_router_adapter.py | ResourcesUrlDispatcherRouterAdapter.add_preflight_handler | def add_preflight_handler(
self,
routing_entity: Union[web.Resource, web.StaticResource,
web.ResourceRoute],
handler):
"""Add OPTIONS handler for all routes defined by `routing_entity`.
Does nothing if CORS handler already handles ro... | python | def add_preflight_handler(
self,
routing_entity: Union[web.Resource, web.StaticResource,
web.ResourceRoute],
handler):
"""Add OPTIONS handler for all routes defined by `routing_entity`.
Does nothing if CORS handler already handles ro... | [
"def",
"add_preflight_handler",
"(",
"self",
",",
"routing_entity",
":",
"Union",
"[",
"web",
".",
"Resource",
",",
"web",
".",
"StaticResource",
",",
"web",
".",
"ResourceRoute",
"]",
",",
"handler",
")",
":",
"if",
"isinstance",
"(",
"routing_entity",
",",... | Add OPTIONS handler for all routes defined by `routing_entity`.
Does nothing if CORS handler already handles routing entity.
Should fail if there are conflicting user-defined OPTIONS handlers. | [
"Add",
"OPTIONS",
"handler",
"for",
"all",
"routes",
"defined",
"by",
"routing_entity",
"."
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/urldispatcher_router_adapter.py#L137-L200 |
18,515 | aio-libs/aiohttp-cors | aiohttp_cors/urldispatcher_router_adapter.py | ResourcesUrlDispatcherRouterAdapter.is_preflight_request | def is_preflight_request(self, request: web.Request) -> bool:
"""Is `request` is a CORS preflight request."""
route = self._request_route(request)
if _is_web_view(route, strict=False):
return request.method == 'OPTIONS'
return route in self._preflight_routes | python | def is_preflight_request(self, request: web.Request) -> bool:
"""Is `request` is a CORS preflight request."""
route = self._request_route(request)
if _is_web_view(route, strict=False):
return request.method == 'OPTIONS'
return route in self._preflight_routes | [
"def",
"is_preflight_request",
"(",
"self",
",",
"request",
":",
"web",
".",
"Request",
")",
"->",
"bool",
":",
"route",
"=",
"self",
".",
"_request_route",
"(",
"request",
")",
"if",
"_is_web_view",
"(",
"route",
",",
"strict",
"=",
"False",
")",
":",
... | Is `request` is a CORS preflight request. | [
"Is",
"request",
"is",
"a",
"CORS",
"preflight",
"request",
"."
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/urldispatcher_router_adapter.py#L214-L219 |
18,516 | aio-libs/aiohttp-cors | aiohttp_cors/urldispatcher_router_adapter.py | ResourcesUrlDispatcherRouterAdapter.is_cors_enabled_on_request | def is_cors_enabled_on_request(self, request: web.Request) -> bool:
"""Is `request` is a request for CORS-enabled resource."""
return self._request_resource(request) in self._resource_config | python | def is_cors_enabled_on_request(self, request: web.Request) -> bool:
"""Is `request` is a request for CORS-enabled resource."""
return self._request_resource(request) in self._resource_config | [
"def",
"is_cors_enabled_on_request",
"(",
"self",
",",
"request",
":",
"web",
".",
"Request",
")",
"->",
"bool",
":",
"return",
"self",
".",
"_request_resource",
"(",
"request",
")",
"in",
"self",
".",
"_resource_config"
] | Is `request` is a request for CORS-enabled resource. | [
"Is",
"request",
"is",
"a",
"request",
"for",
"CORS",
"-",
"enabled",
"resource",
"."
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/urldispatcher_router_adapter.py#L221-L224 |
18,517 | aio-libs/aiohttp-cors | aiohttp_cors/urldispatcher_router_adapter.py | ResourcesUrlDispatcherRouterAdapter.set_config_for_routing_entity | def set_config_for_routing_entity(
self,
routing_entity: Union[web.Resource, web.StaticResource,
web.ResourceRoute],
config):
"""Record configuration for resource or it's route."""
if isinstance(routing_entity, (web.Resource, web.Sta... | python | def set_config_for_routing_entity(
self,
routing_entity: Union[web.Resource, web.StaticResource,
web.ResourceRoute],
config):
"""Record configuration for resource or it's route."""
if isinstance(routing_entity, (web.Resource, web.Sta... | [
"def",
"set_config_for_routing_entity",
"(",
"self",
",",
"routing_entity",
":",
"Union",
"[",
"web",
".",
"Resource",
",",
"web",
".",
"StaticResource",
",",
"web",
".",
"ResourceRoute",
"]",
",",
"config",
")",
":",
"if",
"isinstance",
"(",
"routing_entity",... | Record configuration for resource or it's route. | [
"Record",
"configuration",
"for",
"resource",
"or",
"it",
"s",
"route",
"."
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/urldispatcher_router_adapter.py#L226-L271 |
18,518 | aio-libs/aiohttp-cors | aiohttp_cors/urldispatcher_router_adapter.py | ResourcesUrlDispatcherRouterAdapter.get_non_preflight_request_config | def get_non_preflight_request_config(self, request: web.Request):
"""Get stored CORS configuration for routing entity that handles
specified request."""
assert self.is_cors_enabled_on_request(request)
resource = self._request_resource(request)
resource_config = self._resource_c... | python | def get_non_preflight_request_config(self, request: web.Request):
"""Get stored CORS configuration for routing entity that handles
specified request."""
assert self.is_cors_enabled_on_request(request)
resource = self._request_resource(request)
resource_config = self._resource_c... | [
"def",
"get_non_preflight_request_config",
"(",
"self",
",",
"request",
":",
"web",
".",
"Request",
")",
":",
"assert",
"self",
".",
"is_cors_enabled_on_request",
"(",
"request",
")",
"resource",
"=",
"self",
".",
"_request_resource",
"(",
"request",
")",
"resou... | Get stored CORS configuration for routing entity that handles
specified request. | [
"Get",
"stored",
"CORS",
"configuration",
"for",
"routing",
"entity",
"that",
"handles",
"specified",
"request",
"."
] | 14affbd95c88c675eb513c1d295ede1897930f94 | https://github.com/aio-libs/aiohttp-cors/blob/14affbd95c88c675eb513c1d295ede1897930f94/aiohttp_cors/urldispatcher_router_adapter.py#L302-L324 |
18,519 | HewlettPackard/python-hpOneView | hpOneView/resources/facilities/datacenters.py | Datacenters.add | def add(self, information, timeout=-1):
"""
Adds a data center resource based upon the attributes specified.
Args:
information: Data center information
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
... | python | def add(self, information, timeout=-1):
"""
Adds a data center resource based upon the attributes specified.
Args:
information: Data center information
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
... | [
"def",
"add",
"(",
"self",
",",
"information",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_client",
".",
"create",
"(",
"information",
",",
"timeout",
"=",
"timeout",
")"
] | Adds a data center resource based upon the attributes specified.
Args:
information: Data center information
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just stops waiting for its completion.
... | [
"Adds",
"a",
"data",
"center",
"resource",
"based",
"upon",
"the",
"attributes",
"specified",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/facilities/datacenters.py#L138-L150 |
18,520 | HewlettPackard/python-hpOneView | hpOneView/resources/facilities/datacenters.py | Datacenters.update | def update(self, resource, timeout=-1):
"""
Updates the specified data center resource.
Args:
resource (dict): Object to update.
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just... | python | def update(self, resource, timeout=-1):
"""
Updates the specified data center resource.
Args:
resource (dict): Object to update.
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just... | [
"def",
"update",
"(",
"self",
",",
"resource",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_client",
".",
"update",
"(",
"resource",
",",
"timeout",
"=",
"timeout",
")"
] | Updates the specified data center resource.
Args:
resource (dict): Object to update.
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just stops waiting for its completion.
Returns:
... | [
"Updates",
"the",
"specified",
"data",
"center",
"resource",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/facilities/datacenters.py#L152-L164 |
18,521 | HewlettPackard/python-hpOneView | hpOneView/resources/facilities/datacenters.py | Datacenters.remove_all | def remove_all(self, filter, force=False, timeout=-1):
"""
Deletes the set of datacenters according to the specified parameters. A filter is required to identify the set
of resources to be deleted.
Args:
filter:
A general filter/query string to narrow the li... | python | def remove_all(self, filter, force=False, timeout=-1):
"""
Deletes the set of datacenters according to the specified parameters. A filter is required to identify the set
of resources to be deleted.
Args:
filter:
A general filter/query string to narrow the li... | [
"def",
"remove_all",
"(",
"self",
",",
"filter",
",",
"force",
"=",
"False",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_client",
".",
"delete_all",
"(",
"filter",
"=",
"filter",
",",
"force",
"=",
"force",
",",
"timeout",
"=",
... | Deletes the set of datacenters according to the specified parameters. A filter is required to identify the set
of resources to be deleted.
Args:
filter:
A general filter/query string to narrow the list of items that will be removed.
force:
If se... | [
"Deletes",
"the",
"set",
"of",
"datacenters",
"according",
"to",
"the",
"specified",
"parameters",
".",
"A",
"filter",
"is",
"required",
"to",
"identify",
"the",
"set",
"of",
"resources",
"to",
"be",
"deleted",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/facilities/datacenters.py#L166-L184 |
18,522 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/drive_enclosures.py | DriveEnclosures.get_by | def get_by(self, field, value):
"""
Gets all drive enclosures that match the filter.
The search is case-insensitive.
Args:
Field: field name to filter.
Value: value to filter.
Returns:
list: A list of drive enclosures.
"""
re... | python | def get_by(self, field, value):
"""
Gets all drive enclosures that match the filter.
The search is case-insensitive.
Args:
Field: field name to filter.
Value: value to filter.
Returns:
list: A list of drive enclosures.
"""
re... | [
"def",
"get_by",
"(",
"self",
",",
"field",
",",
"value",
")",
":",
"return",
"self",
".",
"_client",
".",
"get_by",
"(",
"field",
"=",
"field",
",",
"value",
"=",
"value",
")"
] | Gets all drive enclosures that match the filter.
The search is case-insensitive.
Args:
Field: field name to filter.
Value: value to filter.
Returns:
list: A list of drive enclosures. | [
"Gets",
"all",
"drive",
"enclosures",
"that",
"match",
"the",
"filter",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/drive_enclosures.py#L91-L104 |
18,523 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/drive_enclosures.py | DriveEnclosures.refresh_state | def refresh_state(self, id_or_uri, configuration, timeout=-1):
"""
Refreshes a drive enclosure.
Args:
id_or_uri: Can be either the resource ID or the resource URI.
configuration: Configuration
timeout: Timeout in seconds. Wait for task completion by default. ... | python | def refresh_state(self, id_or_uri, configuration, timeout=-1):
"""
Refreshes a drive enclosure.
Args:
id_or_uri: Can be either the resource ID or the resource URI.
configuration: Configuration
timeout: Timeout in seconds. Wait for task completion by default. ... | [
"def",
"refresh_state",
"(",
"self",
",",
"id_or_uri",
",",
"configuration",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
")",
"+",
"self",
".",
"REFRESH_STATE_PATH",
"return",
"self",
"... | Refreshes a drive enclosure.
Args:
id_or_uri: Can be either the resource ID or the resource URI.
configuration: Configuration
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just stops ... | [
"Refreshes",
"a",
"drive",
"enclosure",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/drive_enclosures.py#L119-L133 |
18,524 | HewlettPackard/python-hpOneView | hpOneView/resources/uncategorized/os_deployment_servers.py | OsDeploymentServers.get_all | def get_all(self, start=0, count=-1, filter='', fields='', query='', sort='', view=''):
"""
Gets a list of Deployment Servers based on optional sorting and filtering, and constrained by start and count
parameters.
Args:
start:
The first item to return, using ... | python | def get_all(self, start=0, count=-1, filter='', fields='', query='', sort='', view=''):
"""
Gets a list of Deployment Servers based on optional sorting and filtering, and constrained by start and count
parameters.
Args:
start:
The first item to return, using ... | [
"def",
"get_all",
"(",
"self",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"fields",
"=",
"''",
",",
"query",
"=",
"''",
",",
"sort",
"=",
"''",
",",
"view",
"=",
"''",
")",
":",
"return",
"self",
".",
... | Gets a list of Deployment Servers based on optional sorting and filtering, and constrained by start and count
parameters.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start with the first available item.
... | [
"Gets",
"a",
"list",
"of",
"Deployment",
"Servers",
"based",
"on",
"optional",
"sorting",
"and",
"filtering",
"and",
"constrained",
"by",
"start",
"and",
"count",
"parameters",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/uncategorized/os_deployment_servers.py#L43-L75 |
18,525 | HewlettPackard/python-hpOneView | hpOneView/resources/uncategorized/os_deployment_servers.py | OsDeploymentServers.delete | def delete(self, resource, force=False, timeout=-1):
"""
Deletes a Deployment Server object based on its UUID or URI.
Args:
resource (dict):
Object to delete.
force:
If set to true, the operation completes despite any problems with
... | python | def delete(self, resource, force=False, timeout=-1):
"""
Deletes a Deployment Server object based on its UUID or URI.
Args:
resource (dict):
Object to delete.
force:
If set to true, the operation completes despite any problems with
... | [
"def",
"delete",
"(",
"self",
",",
"resource",
",",
"force",
"=",
"False",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_client",
".",
"delete",
"(",
"resource",
",",
"force",
"=",
"force",
",",
"timeout",
"=",
"timeout",
")"
] | Deletes a Deployment Server object based on its UUID or URI.
Args:
resource (dict):
Object to delete.
force:
If set to true, the operation completes despite any problems with
network connectivity or errors on the resource itself. The def... | [
"Deletes",
"a",
"Deployment",
"Server",
"object",
"based",
"on",
"its",
"UUID",
"or",
"URI",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/uncategorized/os_deployment_servers.py#L153-L171 |
18,526 | HewlettPackard/python-hpOneView | hpOneView/resources/uncategorized/os_deployment_servers.py | OsDeploymentServers.get_appliances | def get_appliances(self, start=0, count=-1, filter='', fields='', query='', sort='', view=''):
"""
Gets a list of all the Image Streamer resources based on optional sorting and filtering, and constrained
by start and count parameters.
Args:
start:
The first i... | python | def get_appliances(self, start=0, count=-1, filter='', fields='', query='', sort='', view=''):
"""
Gets a list of all the Image Streamer resources based on optional sorting and filtering, and constrained
by start and count parameters.
Args:
start:
The first i... | [
"def",
"get_appliances",
"(",
"self",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"fields",
"=",
"''",
",",
"query",
"=",
"''",
",",
"sort",
"=",
"''",
",",
"view",
"=",
"''",
")",
":",
"uri",
"=",
"sel... | Gets a list of all the Image Streamer resources based on optional sorting and filtering, and constrained
by start and count parameters.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start with the first av... | [
"Gets",
"a",
"list",
"of",
"all",
"the",
"Image",
"Streamer",
"resources",
"based",
"on",
"optional",
"sorting",
"and",
"filtering",
"and",
"constrained",
"by",
"start",
"and",
"count",
"parameters",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/uncategorized/os_deployment_servers.py#L183-L217 |
18,527 | HewlettPackard/python-hpOneView | hpOneView/resources/uncategorized/os_deployment_servers.py | OsDeploymentServers.get_appliance | def get_appliance(self, id_or_uri, fields=''):
"""
Gets the particular Image Streamer resource based on its ID or URI.
Args:
id_or_uri:
Can be either the Os Deployment Server ID or the URI
fields:
Specifies which fields should be returned ... | python | def get_appliance(self, id_or_uri, fields=''):
"""
Gets the particular Image Streamer resource based on its ID or URI.
Args:
id_or_uri:
Can be either the Os Deployment Server ID or the URI
fields:
Specifies which fields should be returned ... | [
"def",
"get_appliance",
"(",
"self",
",",
"id_or_uri",
",",
"fields",
"=",
"''",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"'/image-streamer-appliances/'",
"+",
"extract_id_from_uri",
"(",
"id_or_uri",
")",
"if",
"fields",
":",
"uri",
"+=",
"'?fields='"... | Gets the particular Image Streamer resource based on its ID or URI.
Args:
id_or_uri:
Can be either the Os Deployment Server ID or the URI
fields:
Specifies which fields should be returned in the result.
Returns:
dict: Image Streamer ... | [
"Gets",
"the",
"particular",
"Image",
"Streamer",
"resource",
"based",
"on",
"its",
"ID",
"or",
"URI",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/uncategorized/os_deployment_servers.py#L219-L236 |
18,528 | HewlettPackard/python-hpOneView | hpOneView/resources/uncategorized/os_deployment_servers.py | OsDeploymentServers.get_appliance_by_name | def get_appliance_by_name(self, appliance_name):
"""
Gets the particular Image Streamer resource based on its name.
Args:
appliance_name:
The Image Streamer resource name.
Returns:
dict: Image Streamer resource.
"""
appliances = ... | python | def get_appliance_by_name(self, appliance_name):
"""
Gets the particular Image Streamer resource based on its name.
Args:
appliance_name:
The Image Streamer resource name.
Returns:
dict: Image Streamer resource.
"""
appliances = ... | [
"def",
"get_appliance_by_name",
"(",
"self",
",",
"appliance_name",
")",
":",
"appliances",
"=",
"self",
".",
"get_appliances",
"(",
")",
"if",
"appliances",
":",
"for",
"appliance",
"in",
"appliances",
":",
"if",
"appliance",
"[",
"'name'",
"]",
"==",
"appl... | Gets the particular Image Streamer resource based on its name.
Args:
appliance_name:
The Image Streamer resource name.
Returns:
dict: Image Streamer resource. | [
"Gets",
"the",
"particular",
"Image",
"Streamer",
"resource",
"based",
"on",
"its",
"name",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/uncategorized/os_deployment_servers.py#L238-L255 |
18,529 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/storage_systems.py | StorageSystems.get_managed_ports | def get_managed_ports(self, id_or_uri, port_id_or_uri=''):
"""
Gets all ports or a specific managed target port for the specified storage system.
Args:
id_or_uri: Can be either the storage system id or the storage system uri.
port_id_or_uri: Can be either the port id or ... | python | def get_managed_ports(self, id_or_uri, port_id_or_uri=''):
"""
Gets all ports or a specific managed target port for the specified storage system.
Args:
id_or_uri: Can be either the storage system id or the storage system uri.
port_id_or_uri: Can be either the port id or ... | [
"def",
"get_managed_ports",
"(",
"self",
",",
"id_or_uri",
",",
"port_id_or_uri",
"=",
"''",
")",
":",
"if",
"port_id_or_uri",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"port_id_or_uri",
")",
"if",
"\"/managedPorts\"",
"not",
"in",
"uri... | Gets all ports or a specific managed target port for the specified storage system.
Args:
id_or_uri: Can be either the storage system id or the storage system uri.
port_id_or_uri: Can be either the port id or the port uri.
Returns:
dict: Managed ports. | [
"Gets",
"all",
"ports",
"or",
"a",
"specific",
"managed",
"target",
"port",
"for",
"the",
"specified",
"storage",
"system",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_systems.py#L163-L182 |
18,530 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/storage_systems.py | StorageSystems.get_by_ip_hostname | def get_by_ip_hostname(self, ip_hostname):
"""
Retrieve a storage system by its IP.
Works only with API version <= 300.
Args:
ip_hostname: Storage system IP or hostname.
Returns:
dict
"""
resources = self._client.get_all()
resou... | python | def get_by_ip_hostname(self, ip_hostname):
"""
Retrieve a storage system by its IP.
Works only with API version <= 300.
Args:
ip_hostname: Storage system IP or hostname.
Returns:
dict
"""
resources = self._client.get_all()
resou... | [
"def",
"get_by_ip_hostname",
"(",
"self",
",",
"ip_hostname",
")",
":",
"resources",
"=",
"self",
".",
"_client",
".",
"get_all",
"(",
")",
"resources_filtered",
"=",
"[",
"x",
"for",
"x",
"in",
"resources",
"if",
"x",
"[",
"'credentials'",
"]",
"[",
"'i... | Retrieve a storage system by its IP.
Works only with API version <= 300.
Args:
ip_hostname: Storage system IP or hostname.
Returns:
dict | [
"Retrieve",
"a",
"storage",
"system",
"by",
"its",
"IP",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_systems.py#L211-L230 |
18,531 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/storage_systems.py | StorageSystems.get_by_hostname | def get_by_hostname(self, hostname):
"""
Retrieve a storage system by its hostname.
Works only in API500 onwards.
Args:
hostname: Storage system hostname.
Returns:
dict
"""
resources = self._client.get_all()
resources_filtered =... | python | def get_by_hostname(self, hostname):
"""
Retrieve a storage system by its hostname.
Works only in API500 onwards.
Args:
hostname: Storage system hostname.
Returns:
dict
"""
resources = self._client.get_all()
resources_filtered =... | [
"def",
"get_by_hostname",
"(",
"self",
",",
"hostname",
")",
":",
"resources",
"=",
"self",
".",
"_client",
".",
"get_all",
"(",
")",
"resources_filtered",
"=",
"[",
"x",
"for",
"x",
"in",
"resources",
"if",
"x",
"[",
"'hostname'",
"]",
"==",
"hostname",... | Retrieve a storage system by its hostname.
Works only in API500 onwards.
Args:
hostname: Storage system hostname.
Returns:
dict | [
"Retrieve",
"a",
"storage",
"system",
"by",
"its",
"hostname",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_systems.py#L232-L251 |
18,532 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/storage_systems.py | StorageSystems.get_reachable_ports | def get_reachable_ports(self, id_or_uri, start=0, count=-1, filter='', query='', sort='', networks=[]):
"""
Gets the storage ports that are connected on the specified networks
based on the storage system port's expected network connectivity.
Returns:
list: Reachable Storage ... | python | def get_reachable_ports(self, id_or_uri, start=0, count=-1, filter='', query='', sort='', networks=[]):
"""
Gets the storage ports that are connected on the specified networks
based on the storage system port's expected network connectivity.
Returns:
list: Reachable Storage ... | [
"def",
"get_reachable_ports",
"(",
"self",
",",
"id_or_uri",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"query",
"=",
"''",
",",
"sort",
"=",
"''",
",",
"networks",
"=",
"[",
"]",
")",
":",
"uri",
"=",
"... | Gets the storage ports that are connected on the specified networks
based on the storage system port's expected network connectivity.
Returns:
list: Reachable Storage Port List. | [
"Gets",
"the",
"storage",
"ports",
"that",
"are",
"connected",
"on",
"the",
"specified",
"networks",
"based",
"on",
"the",
"storage",
"system",
"port",
"s",
"expected",
"network",
"connectivity",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_systems.py#L253-L271 |
18,533 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/storage_systems.py | StorageSystems.get_templates | def get_templates(self, id_or_uri, start=0, count=-1, filter='', query='', sort=''):
"""
Gets a list of volume templates. Returns a list of storage templates belonging to the storage system.
Returns:
list: Storage Template List.
"""
uri = self._client.build_uri(id_or... | python | def get_templates(self, id_or_uri, start=0, count=-1, filter='', query='', sort=''):
"""
Gets a list of volume templates. Returns a list of storage templates belonging to the storage system.
Returns:
list: Storage Template List.
"""
uri = self._client.build_uri(id_or... | [
"def",
"get_templates",
"(",
"self",
",",
"id_or_uri",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"query",
"=",
"''",
",",
"sort",
"=",
"''",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",... | Gets a list of volume templates. Returns a list of storage templates belonging to the storage system.
Returns:
list: Storage Template List. | [
"Gets",
"a",
"list",
"of",
"volume",
"templates",
".",
"Returns",
"a",
"list",
"of",
"storage",
"templates",
"belonging",
"to",
"the",
"storage",
"system",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_systems.py#L273-L282 |
18,534 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/fabrics.py | Fabrics.get_reserved_vlan_range | def get_reserved_vlan_range(self, id_or_uri):
"""
Gets the reserved vlan ID range for the fabric.
Note:
This method is only available on HPE Synergy.
Args:
id_or_uri: ID or URI of fabric.
Returns:
dict: vlan-pool
"""
uri = se... | python | def get_reserved_vlan_range(self, id_or_uri):
"""
Gets the reserved vlan ID range for the fabric.
Note:
This method is only available on HPE Synergy.
Args:
id_or_uri: ID or URI of fabric.
Returns:
dict: vlan-pool
"""
uri = se... | [
"def",
"get_reserved_vlan_range",
"(",
"self",
",",
"id_or_uri",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
")",
"+",
"\"/reserved-vlan-range\"",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"uri",
")"
] | Gets the reserved vlan ID range for the fabric.
Note:
This method is only available on HPE Synergy.
Args:
id_or_uri: ID or URI of fabric.
Returns:
dict: vlan-pool | [
"Gets",
"the",
"reserved",
"vlan",
"ID",
"range",
"for",
"the",
"fabric",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/fabrics.py#L107-L121 |
18,535 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/fabrics.py | Fabrics.update_reserved_vlan_range | def update_reserved_vlan_range(self, id_or_uri, vlan_pool, force=False):
"""
Updates the reserved vlan ID range for the fabric.
Note:
This method is only available on HPE Synergy.
Args:
id_or_uri: ID or URI of fabric.
vlan_pool (dict): vlan-pool data... | python | def update_reserved_vlan_range(self, id_or_uri, vlan_pool, force=False):
"""
Updates the reserved vlan ID range for the fabric.
Note:
This method is only available on HPE Synergy.
Args:
id_or_uri: ID or URI of fabric.
vlan_pool (dict): vlan-pool data... | [
"def",
"update_reserved_vlan_range",
"(",
"self",
",",
"id_or_uri",
",",
"vlan_pool",
",",
"force",
"=",
"False",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
")",
"+",
"\"/reserved-vlan-range\"",
"return",
"self",
".",
"... | Updates the reserved vlan ID range for the fabric.
Note:
This method is only available on HPE Synergy.
Args:
id_or_uri: ID or URI of fabric.
vlan_pool (dict): vlan-pool data to update.
force: If set to true, the operation completes despite any problems ... | [
"Updates",
"the",
"reserved",
"vlan",
"ID",
"range",
"for",
"the",
"fabric",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/fabrics.py#L123-L140 |
18,536 | HewlettPackard/python-hpOneView | hpOneView/resources/security/roles.py | Roles.get | def get(self, name_or_uri):
"""
Get the role by its URI or Name.
Args:
name_or_uri:
Can be either the Name or the URI.
Returns:
dict: Role
"""
name_or_uri = quote(name_or_uri)
return self._client.get(name_or_uri) | python | def get(self, name_or_uri):
"""
Get the role by its URI or Name.
Args:
name_or_uri:
Can be either the Name or the URI.
Returns:
dict: Role
"""
name_or_uri = quote(name_or_uri)
return self._client.get(name_or_uri) | [
"def",
"get",
"(",
"self",
",",
"name_or_uri",
")",
":",
"name_or_uri",
"=",
"quote",
"(",
"name_or_uri",
")",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"name_or_uri",
")"
] | Get the role by its URI or Name.
Args:
name_or_uri:
Can be either the Name or the URI.
Returns:
dict: Role | [
"Get",
"the",
"role",
"by",
"its",
"URI",
"or",
"Name",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/roles.py#L74-L86 |
18,537 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/sas_logical_jbods.py | SasLogicalJbods.get_drives | def get_drives(self, id_or_uri):
"""
Gets the list of drives allocated to this SAS logical JBOD.
Args:
id_or_uri: Can be either the SAS logical JBOD ID or the SAS logical JBOD URI.
Returns:
list: A list of Drives
"""
uri = self._client.build_uri(... | python | def get_drives(self, id_or_uri):
"""
Gets the list of drives allocated to this SAS logical JBOD.
Args:
id_or_uri: Can be either the SAS logical JBOD ID or the SAS logical JBOD URI.
Returns:
list: A list of Drives
"""
uri = self._client.build_uri(... | [
"def",
"get_drives",
"(",
"self",
",",
"id_or_uri",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
"=",
"id_or_uri",
")",
"+",
"self",
".",
"DRIVES_PATH",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"id_or_uri",
... | Gets the list of drives allocated to this SAS logical JBOD.
Args:
id_or_uri: Can be either the SAS logical JBOD ID or the SAS logical JBOD URI.
Returns:
list: A list of Drives | [
"Gets",
"the",
"list",
"of",
"drives",
"allocated",
"to",
"this",
"SAS",
"logical",
"JBOD",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/sas_logical_jbods.py#L104-L115 |
18,538 | HewlettPackard/python-hpOneView | hpOneView/resources/servers/id_pools_ranges.py | IdPoolsRanges.enable | def enable(self, information, id_or_uri, timeout=-1):
"""
Enables or disables a range.
Args:
information (dict): Information to update.
id_or_uri: ID or URI of range.
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort... | python | def enable(self, information, id_or_uri, timeout=-1):
"""
Enables or disables a range.
Args:
information (dict): Information to update.
id_or_uri: ID or URI of range.
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort... | [
"def",
"enable",
"(",
"self",
",",
"information",
",",
"id_or_uri",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
")",
"return",
"self",
".",
"_client",
".",
"update",
"(",
"information... | Enables or disables a range.
Args:
information (dict): Information to update.
id_or_uri: ID or URI of range.
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just stops waiting for its c... | [
"Enables",
"or",
"disables",
"a",
"range",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/id_pools_ranges.py#L86-L102 |
18,539 | HewlettPackard/python-hpOneView | hpOneView/resources/servers/id_pools_ranges.py | IdPoolsRanges.get_allocated_fragments | def get_allocated_fragments(self, id_or_uri, count=-1, start=0):
"""
Gets all fragments that have been allocated in range.
Args:
id_or_uri:
ID or URI of range.
count:
The number of resources to return. A count of -1 requests all items. Th... | python | def get_allocated_fragments(self, id_or_uri, count=-1, start=0):
"""
Gets all fragments that have been allocated in range.
Args:
id_or_uri:
ID or URI of range.
count:
The number of resources to return. A count of -1 requests all items. Th... | [
"def",
"get_allocated_fragments",
"(",
"self",
",",
"id_or_uri",
",",
"count",
"=",
"-",
"1",
",",
"start",
"=",
"0",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
")",
"+",
"\"/allocated-fragments?start={0}&count={1}\"",
... | Gets all fragments that have been allocated in range.
Args:
id_or_uri:
ID or URI of range.
count:
The number of resources to return. A count of -1 requests all items. The actual number of items in
the response may differ from the request... | [
"Gets",
"all",
"fragments",
"that",
"have",
"been",
"allocated",
"in",
"range",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/id_pools_ranges.py#L123-L142 |
18,540 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.get_all | def get_all(self, start=0, count=-1, sort=''):
"""
Gets a list of logical interconnects based on optional sorting and filtering and is constrained by start
and count parameters.
Args:
start:
The first item to return, using 0-based indexing.
If... | python | def get_all(self, start=0, count=-1, sort=''):
"""
Gets a list of logical interconnects based on optional sorting and filtering and is constrained by start
and count parameters.
Args:
start:
The first item to return, using 0-based indexing.
If... | [
"def",
"get_all",
"(",
"self",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"sort",
"=",
"''",
")",
":",
"return",
"self",
".",
"_helper",
".",
"get_all",
"(",
"start",
",",
"count",
",",
"sort",
"=",
"sort",
")"
] | Gets a list of logical interconnects based on optional sorting and filtering and is constrained by start
and count parameters.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start with the first available i... | [
"Gets",
"a",
"list",
"of",
"logical",
"interconnects",
"based",
"on",
"optional",
"sorting",
"and",
"filtering",
"and",
"is",
"constrained",
"by",
"start",
"and",
"count",
"parameters",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L89-L109 |
18,541 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.update_compliance | def update_compliance(self, timeout=-1):
"""
Returns logical interconnects to a consistent state. The current logical interconnect state is
compared to the associated logical interconnect group.
Any differences identified are corrected, bringing the logical interconnect back to a consis... | python | def update_compliance(self, timeout=-1):
"""
Returns logical interconnects to a consistent state. The current logical interconnect state is
compared to the associated logical interconnect group.
Any differences identified are corrected, bringing the logical interconnect back to a consis... | [
"def",
"update_compliance",
"(",
"self",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{}/compliance\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
")",
"return",
"self",
".",
"_helper",
".",
"update",
"(",
"None",
",",
"... | Returns logical interconnects to a consistent state. The current logical interconnect state is
compared to the associated logical interconnect group.
Any differences identified are corrected, bringing the logical interconnect back to a consistent
state. Changes are asynchronously applied to all... | [
"Returns",
"logical",
"interconnects",
"to",
"a",
"consistent",
"state",
".",
"The",
"current",
"logical",
"interconnect",
"state",
"is",
"compared",
"to",
"the",
"associated",
"logical",
"interconnect",
"group",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L131-L150 |
18,542 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.update_ethernet_settings | def update_ethernet_settings(self, configuration, force=False, timeout=-1):
"""
Updates the Ethernet interconnect settings for the logical interconnect.
Args:
configuration: Ethernet interconnect settings.
force: If set to true, the operation completes despite any probl... | python | def update_ethernet_settings(self, configuration, force=False, timeout=-1):
"""
Updates the Ethernet interconnect settings for the logical interconnect.
Args:
configuration: Ethernet interconnect settings.
force: If set to true, the operation completes despite any probl... | [
"def",
"update_ethernet_settings",
"(",
"self",
",",
"configuration",
",",
"force",
"=",
"False",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{}/ethernetSettings\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
")",
"return",
... | Updates the Ethernet interconnect settings for the logical interconnect.
Args:
configuration: Ethernet interconnect settings.
force: If set to true, the operation completes despite any problems with network connectivity or errors
on the resource itself. The default is f... | [
"Updates",
"the",
"Ethernet",
"interconnect",
"settings",
"for",
"the",
"logical",
"interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L153-L168 |
18,543 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.update_internal_networks | def update_internal_networks(self, network_uri_list, force=False, timeout=-1):
"""
Updates internal networks on the logical interconnect.
Args:
network_uri_list: List of Ethernet network uris.
force: If set to true, the operation completes despite any problems with netwo... | python | def update_internal_networks(self, network_uri_list, force=False, timeout=-1):
"""
Updates internal networks on the logical interconnect.
Args:
network_uri_list: List of Ethernet network uris.
force: If set to true, the operation completes despite any problems with netwo... | [
"def",
"update_internal_networks",
"(",
"self",
",",
"network_uri_list",
",",
"force",
"=",
"False",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{}/internalNetworks\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
")",
"return"... | Updates internal networks on the logical interconnect.
Args:
network_uri_list: List of Ethernet network uris.
force: If set to true, the operation completes despite any problems with network connectivity or errors
on the resource itself. The default is false.
... | [
"Updates",
"internal",
"networks",
"on",
"the",
"logical",
"interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L171-L186 |
18,544 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.update_configuration | def update_configuration(self, timeout=-1):
"""
Asynchronously applies or re-applies the logical interconnect configuration to all managed interconnects.
Args:
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
... | python | def update_configuration(self, timeout=-1):
"""
Asynchronously applies or re-applies the logical interconnect configuration to all managed interconnects.
Args:
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
... | [
"def",
"update_configuration",
"(",
"self",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{}/configuration\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
")",
"return",
"self",
".",
"_helper",
".",
"update",
"(",
"None",
",... | Asynchronously applies or re-applies the logical interconnect configuration to all managed interconnects.
Args:
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just stops waiting for its completion.
R... | [
"Asynchronously",
"applies",
"or",
"re",
"-",
"applies",
"the",
"logical",
"interconnect",
"configuration",
"to",
"all",
"managed",
"interconnects",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L232-L244 |
18,545 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.get_snmp_configuration | def get_snmp_configuration(self):
"""
Gets the SNMP configuration for a logical interconnect.
Returns:
dict: SNMP configuration.
"""
uri = "{}{}".format(self.data["uri"], self.SNMP_CONFIGURATION_PATH)
return self._helper.do_get(uri) | python | def get_snmp_configuration(self):
"""
Gets the SNMP configuration for a logical interconnect.
Returns:
dict: SNMP configuration.
"""
uri = "{}{}".format(self.data["uri"], self.SNMP_CONFIGURATION_PATH)
return self._helper.do_get(uri) | [
"def",
"get_snmp_configuration",
"(",
"self",
")",
":",
"uri",
"=",
"\"{}{}\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
",",
"self",
".",
"SNMP_CONFIGURATION_PATH",
")",
"return",
"self",
".",
"_helper",
".",
"do_get",
"(",
"uri",
"... | Gets the SNMP configuration for a logical interconnect.
Returns:
dict: SNMP configuration. | [
"Gets",
"the",
"SNMP",
"configuration",
"for",
"a",
"logical",
"interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L247-L255 |
18,546 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.update_snmp_configuration | def update_snmp_configuration(self, configuration, timeout=-1):
"""
Updates the SNMP configuration of a logical interconnect. Changes to the SNMP configuration are asynchronously
applied to all managed interconnects.
Args:
configuration: snmp configuration.
Returns:... | python | def update_snmp_configuration(self, configuration, timeout=-1):
"""
Updates the SNMP configuration of a logical interconnect. Changes to the SNMP configuration are asynchronously
applied to all managed interconnects.
Args:
configuration: snmp configuration.
Returns:... | [
"def",
"update_snmp_configuration",
"(",
"self",
",",
"configuration",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"data",
"=",
"configuration",
".",
"copy",
"(",
")",
"if",
"'type'",
"not",
"in",
"data",
":",
"data",
"[",
"'type'",
"]",
"=",
"'snmp-configu... | Updates the SNMP configuration of a logical interconnect. Changes to the SNMP configuration are asynchronously
applied to all managed interconnects.
Args:
configuration: snmp configuration.
Returns:
dict: The Logical Interconnect. | [
"Updates",
"the",
"SNMP",
"configuration",
"of",
"a",
"logical",
"interconnect",
".",
"Changes",
"to",
"the",
"SNMP",
"configuration",
"are",
"asynchronously",
"applied",
"to",
"all",
"managed",
"interconnects",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L258-L274 |
18,547 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.get_unassigned_ports | def get_unassigned_ports(self):
"""
Gets the collection ports from the member interconnects
which are eligible for assignment to an anlyzer port
Returns:
dict: Collection of ports
"""
uri = "{}/unassignedPortsForPortMonitor".format(self.data["uri"])
r... | python | def get_unassigned_ports(self):
"""
Gets the collection ports from the member interconnects
which are eligible for assignment to an anlyzer port
Returns:
dict: Collection of ports
"""
uri = "{}/unassignedPortsForPortMonitor".format(self.data["uri"])
r... | [
"def",
"get_unassigned_ports",
"(",
"self",
")",
":",
"uri",
"=",
"\"{}/unassignedPortsForPortMonitor\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
")",
"response",
"=",
"self",
".",
"_helper",
".",
"do_get",
"(",
"uri",
")",
"return",
... | Gets the collection ports from the member interconnects
which are eligible for assignment to an anlyzer port
Returns:
dict: Collection of ports | [
"Gets",
"the",
"collection",
"ports",
"from",
"the",
"member",
"interconnects",
"which",
"are",
"eligible",
"for",
"assignment",
"to",
"an",
"anlyzer",
"port"
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L277-L288 |
18,548 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.get_port_monitor | def get_port_monitor(self):
"""
Gets the port monitor configuration of a logical interconnect.
Returns:
dict: The Logical Interconnect.
"""
uri = "{}{}".format(self.data["uri"], self.PORT_MONITOR_PATH)
return self._helper.do_get(uri) | python | def get_port_monitor(self):
"""
Gets the port monitor configuration of a logical interconnect.
Returns:
dict: The Logical Interconnect.
"""
uri = "{}{}".format(self.data["uri"], self.PORT_MONITOR_PATH)
return self._helper.do_get(uri) | [
"def",
"get_port_monitor",
"(",
"self",
")",
":",
"uri",
"=",
"\"{}{}\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
",",
"self",
".",
"PORT_MONITOR_PATH",
")",
"return",
"self",
".",
"_helper",
".",
"do_get",
"(",
"uri",
")"
] | Gets the port monitor configuration of a logical interconnect.
Returns:
dict: The Logical Interconnect. | [
"Gets",
"the",
"port",
"monitor",
"configuration",
"of",
"a",
"logical",
"interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L306-L314 |
18,549 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.update_port_monitor | def update_port_monitor(self, resource, timeout=-1):
"""
Updates the port monitor configuration of a logical interconnect.
Args:
resource: Port monitor configuration.
Returns:
dict: Port monitor configuration.
"""
data = resource.copy()
i... | python | def update_port_monitor(self, resource, timeout=-1):
"""
Updates the port monitor configuration of a logical interconnect.
Args:
resource: Port monitor configuration.
Returns:
dict: Port monitor configuration.
"""
data = resource.copy()
i... | [
"def",
"update_port_monitor",
"(",
"self",
",",
"resource",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"data",
"=",
"resource",
".",
"copy",
"(",
")",
"if",
"'type'",
"not",
"in",
"data",
":",
"data",
"[",
"'type'",
"]",
"=",
"'port-monitor'",
"uri",
"... | Updates the port monitor configuration of a logical interconnect.
Args:
resource: Port monitor configuration.
Returns:
dict: Port monitor configuration. | [
"Updates",
"the",
"port",
"monitor",
"configuration",
"of",
"a",
"logical",
"interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L317-L332 |
18,550 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.create_interconnect | def create_interconnect(self, location_entries, timeout=-1):
"""
Creates an interconnect at the given location.
Warning:
It does not create the LOGICAL INTERCONNECT itself.
It will fail if no interconnect is already present on the specified position.
Args:
... | python | def create_interconnect(self, location_entries, timeout=-1):
"""
Creates an interconnect at the given location.
Warning:
It does not create the LOGICAL INTERCONNECT itself.
It will fail if no interconnect is already present on the specified position.
Args:
... | [
"def",
"create_interconnect",
"(",
"self",
",",
"location_entries",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_helper",
".",
"create",
"(",
"location_entries",
",",
"uri",
"=",
"self",
".",
"locations_uri",
",",
"timeout",
"=",
"time... | Creates an interconnect at the given location.
Warning:
It does not create the LOGICAL INTERCONNECT itself.
It will fail if no interconnect is already present on the specified position.
Args:
location_entries (dict): Dictionary with location entries.
tim... | [
"Creates",
"an",
"interconnect",
"at",
"the",
"given",
"location",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L334-L351 |
18,551 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.delete_interconnect | def delete_interconnect(self, enclosure_uri, bay, timeout=-1):
"""
Deletes an interconnect from a location.
Warning:
This won't delete the LOGICAL INTERCONNECT itself and might cause inconsistency between the enclosure
and Logical Interconnect Group.
Args:
... | python | def delete_interconnect(self, enclosure_uri, bay, timeout=-1):
"""
Deletes an interconnect from a location.
Warning:
This won't delete the LOGICAL INTERCONNECT itself and might cause inconsistency between the enclosure
and Logical Interconnect Group.
Args:
... | [
"def",
"delete_interconnect",
"(",
"self",
",",
"enclosure_uri",
",",
"bay",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{path}?location=Enclosure:{enclosure_uri},Bay:{bay}\"",
".",
"format",
"(",
"path",
"=",
"self",
".",
"LOCATIONS_PATH",
",",
"enc... | Deletes an interconnect from a location.
Warning:
This won't delete the LOGICAL INTERCONNECT itself and might cause inconsistency between the enclosure
and Logical Interconnect Group.
Args:
enclosure_uri: URI of the Enclosure
bay: Bay
timeout... | [
"Deletes",
"an",
"interconnect",
"from",
"a",
"location",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L353-L374 |
18,552 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.get_firmware | def get_firmware(self):
"""
Gets the installed firmware for a logical interconnect.
Returns:
dict: LIFirmware.
"""
firmware_uri = self._helper.build_subresource_uri(self.data["uri"], subresource_path=self.FIRMWARE_PATH)
return self._helper.do_get(firmware_uri... | python | def get_firmware(self):
"""
Gets the installed firmware for a logical interconnect.
Returns:
dict: LIFirmware.
"""
firmware_uri = self._helper.build_subresource_uri(self.data["uri"], subresource_path=self.FIRMWARE_PATH)
return self._helper.do_get(firmware_uri... | [
"def",
"get_firmware",
"(",
"self",
")",
":",
"firmware_uri",
"=",
"self",
".",
"_helper",
".",
"build_subresource_uri",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
",",
"subresource_path",
"=",
"self",
".",
"FIRMWARE_PATH",
")",
"return",
"self",
".",
... | Gets the installed firmware for a logical interconnect.
Returns:
dict: LIFirmware. | [
"Gets",
"the",
"installed",
"firmware",
"for",
"a",
"logical",
"interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L377-L385 |
18,553 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.get_forwarding_information_base | def get_forwarding_information_base(self, filter=''):
"""
Gets the forwarding information base data for a logical interconnect. A maximum of 100 entries is returned.
Optional filtering criteria might be specified.
Args:
filter (list or str):
Filtering criteri... | python | def get_forwarding_information_base(self, filter=''):
"""
Gets the forwarding information base data for a logical interconnect. A maximum of 100 entries is returned.
Optional filtering criteria might be specified.
Args:
filter (list or str):
Filtering criteri... | [
"def",
"get_forwarding_information_base",
"(",
"self",
",",
"filter",
"=",
"''",
")",
":",
"uri",
"=",
"\"{}{}\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
",",
"self",
".",
"FORWARDING_INFORMATION_PATH",
")",
"return",
"self",
".",
"_... | Gets the forwarding information base data for a logical interconnect. A maximum of 100 entries is returned.
Optional filtering criteria might be specified.
Args:
filter (list or str):
Filtering criteria may be specified using supported attributes: interconnectUri, macAddress... | [
"Gets",
"the",
"forwarding",
"information",
"base",
"data",
"for",
"a",
"logical",
"interconnect",
".",
"A",
"maximum",
"of",
"100",
"entries",
"is",
"returned",
".",
"Optional",
"filtering",
"criteria",
"might",
"be",
"specified",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L404-L420 |
18,554 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.create_forwarding_information_base | def create_forwarding_information_base(self, timeout=-1):
"""
Generates the forwarding information base dump file for a logical interconnect.
Args:
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
... | python | def create_forwarding_information_base(self, timeout=-1):
"""
Generates the forwarding information base dump file for a logical interconnect.
Args:
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
... | [
"def",
"create_forwarding_information_base",
"(",
"self",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{}{}\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
",",
"self",
".",
"FORWARDING_INFORMATION_PATH",
")",
"return",
"self",
... | Generates the forwarding information base dump file for a logical interconnect.
Args:
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
OneView, just stops waiting for its completion.
Returns: Inter... | [
"Generates",
"the",
"forwarding",
"information",
"base",
"dump",
"file",
"for",
"a",
"logical",
"interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L423-L435 |
18,555 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.get_qos_aggregated_configuration | def get_qos_aggregated_configuration(self):
"""
Gets the QoS aggregated configuration for the logical interconnect.
Returns:
dict: QoS Configuration.
"""
uri = "{}{}".format(self.data["uri"], self.QOS_AGGREGATED_CONFIGURATION)
return self._helper.do_get(uri) | python | def get_qos_aggregated_configuration(self):
"""
Gets the QoS aggregated configuration for the logical interconnect.
Returns:
dict: QoS Configuration.
"""
uri = "{}{}".format(self.data["uri"], self.QOS_AGGREGATED_CONFIGURATION)
return self._helper.do_get(uri) | [
"def",
"get_qos_aggregated_configuration",
"(",
"self",
")",
":",
"uri",
"=",
"\"{}{}\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
",",
"self",
".",
"QOS_AGGREGATED_CONFIGURATION",
")",
"return",
"self",
".",
"_helper",
".",
"do_get",
"(... | Gets the QoS aggregated configuration for the logical interconnect.
Returns:
dict: QoS Configuration. | [
"Gets",
"the",
"QoS",
"aggregated",
"configuration",
"for",
"the",
"logical",
"interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L438-L446 |
18,556 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.update_qos_aggregated_configuration | def update_qos_aggregated_configuration(self, qos_configuration, timeout=-1):
"""
Updates the QoS aggregated configuration for the logical interconnect.
Args:
qos_configuration:
QOS configuration.
timeout:
Timeout in seconds. Wait for task... | python | def update_qos_aggregated_configuration(self, qos_configuration, timeout=-1):
"""
Updates the QoS aggregated configuration for the logical interconnect.
Args:
qos_configuration:
QOS configuration.
timeout:
Timeout in seconds. Wait for task... | [
"def",
"update_qos_aggregated_configuration",
"(",
"self",
",",
"qos_configuration",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{}{}\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
",",
"self",
".",
"QOS_AGGREGATED_CONFIGURATION"... | Updates the QoS aggregated configuration for the logical interconnect.
Args:
qos_configuration:
QOS configuration.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
OneView, just ... | [
"Updates",
"the",
"QoS",
"aggregated",
"configuration",
"for",
"the",
"logical",
"interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L449-L464 |
18,557 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.update_telemetry_configurations | def update_telemetry_configurations(self, configuration, timeout=-1):
"""
Updates the telemetry configuration of a logical interconnect. Changes to the telemetry configuration are
asynchronously applied to all managed interconnects.
Args:
configuration:
The t... | python | def update_telemetry_configurations(self, configuration, timeout=-1):
"""
Updates the telemetry configuration of a logical interconnect. Changes to the telemetry configuration are
asynchronously applied to all managed interconnects.
Args:
configuration:
The t... | [
"def",
"update_telemetry_configurations",
"(",
"self",
",",
"configuration",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"telemetry_conf_uri",
"=",
"self",
".",
"_get_telemetry_configuration_uri",
"(",
")",
"default_values",
"=",
"self",
".",
"_get_default_values",
"("... | Updates the telemetry configuration of a logical interconnect. Changes to the telemetry configuration are
asynchronously applied to all managed interconnects.
Args:
configuration:
The telemetry configuration for the logical interconnect.
timeout:
... | [
"Updates",
"the",
"telemetry",
"configuration",
"of",
"a",
"logical",
"interconnect",
".",
"Changes",
"to",
"the",
"telemetry",
"configuration",
"are",
"asynchronously",
"applied",
"to",
"all",
"managed",
"interconnects",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L485-L504 |
18,558 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnects.py | LogicalInterconnects.get_ethernet_settings | def get_ethernet_settings(self):
"""
Gets the Ethernet interconnect settings for the Logical Interconnect.
Returns:
dict: Ethernet Interconnect Settings
"""
uri = "{}/ethernetSettings".format(self.data["uri"])
return self._helper.do_get(uri) | python | def get_ethernet_settings(self):
"""
Gets the Ethernet interconnect settings for the Logical Interconnect.
Returns:
dict: Ethernet Interconnect Settings
"""
uri = "{}/ethernetSettings".format(self.data["uri"])
return self._helper.do_get(uri) | [
"def",
"get_ethernet_settings",
"(",
"self",
")",
":",
"uri",
"=",
"\"{}/ethernetSettings\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
")",
"return",
"self",
".",
"_helper",
".",
"do_get",
"(",
"uri",
")"
] | Gets the Ethernet interconnect settings for the Logical Interconnect.
Returns:
dict: Ethernet Interconnect Settings | [
"Gets",
"the",
"Ethernet",
"interconnect",
"settings",
"for",
"the",
"Logical",
"Interconnect",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnects.py#L507-L515 |
18,559 | HewlettPackard/python-hpOneView | hpOneView/image_streamer/resources/os_volumes.py | OsVolumes.download_archive | def download_archive(self, name, file_path):
"""
Download archived logs of the OS Volume.
Args:
name: Name of the OS Volume.
file_path (str): Destination file path.
Returns:
bool: Indicates if the resource was successfully downloaded.
"""
... | python | def download_archive(self, name, file_path):
"""
Download archived logs of the OS Volume.
Args:
name: Name of the OS Volume.
file_path (str): Destination file path.
Returns:
bool: Indicates if the resource was successfully downloaded.
"""
... | [
"def",
"download_archive",
"(",
"self",
",",
"name",
",",
"file_path",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"\"/archive/\"",
"+",
"name",
"return",
"self",
".",
"_client",
".",
"download",
"(",
"uri",
",",
"file_path",
")"
] | Download archived logs of the OS Volume.
Args:
name: Name of the OS Volume.
file_path (str): Destination file path.
Returns:
bool: Indicates if the resource was successfully downloaded. | [
"Download",
"archived",
"logs",
"of",
"the",
"OS",
"Volume",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/os_volumes.py#L110-L122 |
18,560 | HewlettPackard/python-hpOneView | hpOneView/image_streamer/resources/os_volumes.py | OsVolumes.get_storage | def get_storage(self, id_or_uri):
"""
Get storage details of an OS Volume.
Args:
id_or_uri: ID or URI of the OS Volume.
Returns:
dict: Storage details
"""
uri = self.URI + "/{}/storage".format(extract_id_from_uri(id_or_uri))
return self._... | python | def get_storage(self, id_or_uri):
"""
Get storage details of an OS Volume.
Args:
id_or_uri: ID or URI of the OS Volume.
Returns:
dict: Storage details
"""
uri = self.URI + "/{}/storage".format(extract_id_from_uri(id_or_uri))
return self._... | [
"def",
"get_storage",
"(",
"self",
",",
"id_or_uri",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"\"/{}/storage\"",
".",
"format",
"(",
"extract_id_from_uri",
"(",
"id_or_uri",
")",
")",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"uri",
")"
] | Get storage details of an OS Volume.
Args:
id_or_uri: ID or URI of the OS Volume.
Returns:
dict: Storage details | [
"Get",
"storage",
"details",
"of",
"an",
"OS",
"Volume",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/image_streamer/resources/os_volumes.py#L124-L135 |
18,561 | HewlettPackard/python-hpOneView | hpOneView/resources/facilities/racks.py | Racks.get_device_topology | def get_device_topology(self, id_or_uri):
"""
Retrieves the topology information for the rack resource specified by ID or URI.
Args:
id_or_uri: Can be either the resource ID or the resource URI.
Return:
dict: Device topology.
"""
uri = self._clie... | python | def get_device_topology(self, id_or_uri):
"""
Retrieves the topology information for the rack resource specified by ID or URI.
Args:
id_or_uri: Can be either the resource ID or the resource URI.
Return:
dict: Device topology.
"""
uri = self._clie... | [
"def",
"get_device_topology",
"(",
"self",
",",
"id_or_uri",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
")",
"+",
"\"/deviceTopology\"",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"uri",
")"
] | Retrieves the topology information for the rack resource specified by ID or URI.
Args:
id_or_uri: Can be either the resource ID or the resource URI.
Return:
dict: Device topology. | [
"Retrieves",
"the",
"topology",
"information",
"for",
"the",
"rack",
"resource",
"specified",
"by",
"ID",
"or",
"URI",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/facilities/racks.py#L91-L102 |
18,562 | HewlettPackard/python-hpOneView | hpOneView/resources/fc_sans/managed_sans.py | ManagedSANs.get_by_name | def get_by_name(self, name):
"""
Gets a Managed SAN by name.
Args:
name: Name of the Managed SAN
Returns:
dict: Managed SAN.
"""
managed_sans = self.get_all()
result = [x for x in managed_sans if x['name'] == name]
resource = res... | python | def get_by_name(self, name):
"""
Gets a Managed SAN by name.
Args:
name: Name of the Managed SAN
Returns:
dict: Managed SAN.
"""
managed_sans = self.get_all()
result = [x for x in managed_sans if x['name'] == name]
resource = res... | [
"def",
"get_by_name",
"(",
"self",
",",
"name",
")",
":",
"managed_sans",
"=",
"self",
".",
"get_all",
"(",
")",
"result",
"=",
"[",
"x",
"for",
"x",
"in",
"managed_sans",
"if",
"x",
"[",
"'name'",
"]",
"==",
"name",
"]",
"resource",
"=",
"result",
... | Gets a Managed SAN by name.
Args:
name: Name of the Managed SAN
Returns:
dict: Managed SAN. | [
"Gets",
"a",
"Managed",
"SAN",
"by",
"name",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/fc_sans/managed_sans.py#L71-L88 |
18,563 | HewlettPackard/python-hpOneView | hpOneView/resources/fc_sans/managed_sans.py | ManagedSANs.get_endpoints | def get_endpoints(self, start=0, count=-1, filter='', sort=''):
"""
Gets a list of endpoints in a SAN.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start with the first available item.
... | python | def get_endpoints(self, start=0, count=-1, filter='', sort=''):
"""
Gets a list of endpoints in a SAN.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start with the first available item.
... | [
"def",
"get_endpoints",
"(",
"self",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"sort",
"=",
"''",
")",
":",
"uri",
"=",
"\"{}/endpoints/\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
"... | Gets a list of endpoints in a SAN.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start with the first available item.
count:
The number of resources to return. A count of -1 requests al... | [
"Gets",
"a",
"list",
"of",
"endpoints",
"in",
"a",
"SAN",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/fc_sans/managed_sans.py#L99-L122 |
18,564 | HewlettPackard/python-hpOneView | hpOneView/resources/fc_sans/managed_sans.py | ManagedSANs.create_endpoints_csv_file | def create_endpoints_csv_file(self, timeout=-1):
"""
Creates an endpoints CSV file for a SAN.
Args:
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
OneView, just stops waiting for its compl... | python | def create_endpoints_csv_file(self, timeout=-1):
"""
Creates an endpoints CSV file for a SAN.
Args:
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
OneView, just stops waiting for its compl... | [
"def",
"create_endpoints_csv_file",
"(",
"self",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{}/endpoints/\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
")",
"return",
"self",
".",
"_helper",
".",
"do_post",
"(",
"uri",
... | Creates an endpoints CSV file for a SAN.
Args:
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
OneView, just stops waiting for its completion.
Returns:
dict: Endpoint CSV File Response... | [
"Creates",
"an",
"endpoints",
"CSV",
"file",
"for",
"a",
"SAN",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/fc_sans/managed_sans.py#L125-L138 |
18,565 | HewlettPackard/python-hpOneView | hpOneView/resources/fc_sans/managed_sans.py | ManagedSANs.create_issues_report | def create_issues_report(self, timeout=-1):
"""
Creates an unexpected zoning report for a SAN.
Args:
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
OneView, just stops waiting for its comp... | python | def create_issues_report(self, timeout=-1):
"""
Creates an unexpected zoning report for a SAN.
Args:
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
OneView, just stops waiting for its comp... | [
"def",
"create_issues_report",
"(",
"self",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{}/issues/\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
")",
"return",
"self",
".",
"_helper",
".",
"create_report",
"(",
"uri",
",... | Creates an unexpected zoning report for a SAN.
Args:
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in
OneView, just stops waiting for its completion.
Returns:
list: A list of FCIssueRes... | [
"Creates",
"an",
"unexpected",
"zoning",
"report",
"for",
"a",
"SAN",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/fc_sans/managed_sans.py#L141-L154 |
18,566 | HewlettPackard/python-hpOneView | hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py | ApplianceDeviceSNMPv1TrapDestinations.create | def create(self, resource, id=None, timeout=-1):
"""
Adds the specified trap forwarding destination.
The trap destination associated with the specified id will be created if trap destination with that id does not exists.
The id can only be an integer greater than 0.
Args:
... | python | def create(self, resource, id=None, timeout=-1):
"""
Adds the specified trap forwarding destination.
The trap destination associated with the specified id will be created if trap destination with that id does not exists.
The id can only be an integer greater than 0.
Args:
... | [
"def",
"create",
"(",
"self",
",",
"resource",
",",
"id",
"=",
"None",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"if",
"not",
"id",
":",
"available_id",
"=",
"self",
".",
"__get_first_available_id",
"(",
")",
"uri",
"=",
"'%s/%s'",
"%",
"(",
"self",
... | Adds the specified trap forwarding destination.
The trap destination associated with the specified id will be created if trap destination with that id does not exists.
The id can only be an integer greater than 0.
Args:
resource (dict): Object to create.
timeout:
... | [
"Adds",
"the",
"specified",
"trap",
"forwarding",
"destination",
".",
"The",
"trap",
"destination",
"associated",
"with",
"the",
"specified",
"id",
"will",
"be",
"created",
"if",
"trap",
"destination",
"with",
"that",
"id",
"does",
"not",
"exists",
".",
"The",... | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py#L46-L67 |
18,567 | HewlettPackard/python-hpOneView | hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py | ApplianceDeviceSNMPv1TrapDestinations.__findFirstMissing | def __findFirstMissing(self, array, start, end):
"""
Find the smallest elements missing in a sorted array.
Returns:
int: The smallest element missing.
"""
if (start > end):
return end + 1
if (start != array[start]):
return start
... | python | def __findFirstMissing(self, array, start, end):
"""
Find the smallest elements missing in a sorted array.
Returns:
int: The smallest element missing.
"""
if (start > end):
return end + 1
if (start != array[start]):
return start
... | [
"def",
"__findFirstMissing",
"(",
"self",
",",
"array",
",",
"start",
",",
"end",
")",
":",
"if",
"(",
"start",
">",
"end",
")",
":",
"return",
"end",
"+",
"1",
"if",
"(",
"start",
"!=",
"array",
"[",
"start",
"]",
")",
":",
"return",
"start",
"m... | Find the smallest elements missing in a sorted array.
Returns:
int: The smallest element missing. | [
"Find",
"the",
"smallest",
"elements",
"missing",
"in",
"a",
"sorted",
"array",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py#L69-L87 |
18,568 | HewlettPackard/python-hpOneView | hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py | ApplianceDeviceSNMPv1TrapDestinations.__get_first_available_id | def __get_first_available_id(self):
"""
Private method to get the first available id.
The id can only be an integer greater than 0.
Returns:
int: The first available id
"""
traps = self.get_all()
if traps:
used_ids = [0]
for tr... | python | def __get_first_available_id(self):
"""
Private method to get the first available id.
The id can only be an integer greater than 0.
Returns:
int: The first available id
"""
traps = self.get_all()
if traps:
used_ids = [0]
for tr... | [
"def",
"__get_first_available_id",
"(",
"self",
")",
":",
"traps",
"=",
"self",
".",
"get_all",
"(",
")",
"if",
"traps",
":",
"used_ids",
"=",
"[",
"0",
"]",
"for",
"trap",
"in",
"traps",
":",
"used_uris",
"=",
"trap",
".",
"get",
"(",
"'uri'",
")",
... | Private method to get the first available id.
The id can only be an integer greater than 0.
Returns:
int: The first available id | [
"Private",
"method",
"to",
"get",
"the",
"first",
"available",
"id",
".",
"The",
"id",
"can",
"only",
"be",
"an",
"integer",
"greater",
"than",
"0",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/appliance_device_snmp_v1_trap_destinations.py#L89-L106 |
18,569 | HewlettPackard/python-hpOneView | hpOneView/resources/servers/id_pools_ipv4_ranges.py | IdPoolsIpv4Ranges.update | def update(self, information, timeout=-1):
"""
Edit an IPv4 Range.
Args:
information (dict): Information to update.
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just stops waitin... | python | def update(self, information, timeout=-1):
"""
Edit an IPv4 Range.
Args:
information (dict): Information to update.
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just stops waitin... | [
"def",
"update",
"(",
"self",
",",
"information",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_client",
".",
"update",
"(",
"information",
",",
"timeout",
"=",
"timeout",
")"
] | Edit an IPv4 Range.
Args:
information (dict): Information to update.
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView; it just stops waiting for its completion.
Returns:
dict: Updat... | [
"Edit",
"an",
"IPv4",
"Range",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/id_pools_ipv4_ranges.py#L92-L105 |
18,570 | HewlettPackard/python-hpOneView | hpOneView/resources/task_monitor.py | TaskMonitor.wait_for_task | def wait_for_task(self, task, timeout=-1):
"""
Wait for task execution and return associated resource.
Args:
task: task dict
timeout: timeout in seconds
Returns:
Associated resource when creating or updating; True when deleting.
"""
s... | python | def wait_for_task(self, task, timeout=-1):
"""
Wait for task execution and return associated resource.
Args:
task: task dict
timeout: timeout in seconds
Returns:
Associated resource when creating or updating; True when deleting.
"""
s... | [
"def",
"wait_for_task",
"(",
"self",
",",
"task",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"self",
".",
"__wait_task_completion",
"(",
"task",
",",
"timeout",
")",
"task",
"=",
"self",
".",
"get",
"(",
"task",
")",
"logger",
".",
"debug",
"(",
"\"Wai... | Wait for task execution and return associated resource.
Args:
task: task dict
timeout: timeout in seconds
Returns:
Associated resource when creating or updating; True when deleting. | [
"Wait",
"for",
"task",
"execution",
"and",
"return",
"associated",
"resource",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/task_monitor.py#L70-L90 |
18,571 | HewlettPackard/python-hpOneView | hpOneView/resources/task_monitor.py | TaskMonitor.get_completed_task | def get_completed_task(self, task, timeout=-1):
"""
Waits until the task is completed and returns the task resource.
Args:
task: TaskResource
timeout: Timeout in seconds
Returns:
dict: TaskResource
"""
self.__wait_task_completion(task... | python | def get_completed_task(self, task, timeout=-1):
"""
Waits until the task is completed and returns the task resource.
Args:
task: TaskResource
timeout: Timeout in seconds
Returns:
dict: TaskResource
"""
self.__wait_task_completion(task... | [
"def",
"get_completed_task",
"(",
"self",
",",
"task",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"self",
".",
"__wait_task_completion",
"(",
"task",
",",
"timeout",
")",
"return",
"self",
".",
"get",
"(",
"task",
")"
] | Waits until the task is completed and returns the task resource.
Args:
task: TaskResource
timeout: Timeout in seconds
Returns:
dict: TaskResource | [
"Waits",
"until",
"the",
"task",
"is",
"completed",
"and",
"returns",
"the",
"task",
"resource",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/task_monitor.py#L92-L105 |
18,572 | HewlettPackard/python-hpOneView | hpOneView/resources/task_monitor.py | TaskMonitor.get_associated_resource | def get_associated_resource(self, task):
"""
Retrieve a resource associated with a task.
Args:
task: task dict
Returns:
tuple: task (updated), the entity found (dict)
"""
if not task:
raise HPOneViewUnknownType(MSG_INVALID_TASK)
... | python | def get_associated_resource(self, task):
"""
Retrieve a resource associated with a task.
Args:
task: task dict
Returns:
tuple: task (updated), the entity found (dict)
"""
if not task:
raise HPOneViewUnknownType(MSG_INVALID_TASK)
... | [
"def",
"get_associated_resource",
"(",
"self",
",",
"task",
")",
":",
"if",
"not",
"task",
":",
"raise",
"HPOneViewUnknownType",
"(",
"MSG_INVALID_TASK",
")",
"if",
"task",
"[",
"'category'",
"]",
"!=",
"'tasks'",
"and",
"task",
"[",
"'category'",
"]",
"!=",... | Retrieve a resource associated with a task.
Args:
task: task dict
Returns:
tuple: task (updated), the entity found (dict) | [
"Retrieve",
"a",
"resource",
"associated",
"with",
"a",
"task",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/task_monitor.py#L225-L261 |
18,573 | HewlettPackard/python-hpOneView | hpOneView/resources/settings/backups.py | Backups.update_config | def update_config(self, config, timeout=-1):
"""
Updates the remote server configuration and the automatic backup schedule for backup.
Args:
config (dict): Object to update.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout doe... | python | def update_config(self, config, timeout=-1):
"""
Updates the remote server configuration and the automatic backup schedule for backup.
Args:
config (dict): Object to update.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout doe... | [
"def",
"update_config",
"(",
"self",
",",
"config",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_client",
".",
"update",
"(",
"config",
",",
"uri",
"=",
"self",
".",
"URI",
"+",
"\"/config\"",
",",
"timeout",
"=",
"timeout",
")"
... | Updates the remote server configuration and the automatic backup schedule for backup.
Args:
config (dict): Object to update.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView, just stop w... | [
"Updates",
"the",
"remote",
"server",
"configuration",
"and",
"the",
"automatic",
"backup",
"schedule",
"for",
"backup",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/backups.py#L125-L139 |
18,574 | HewlettPackard/python-hpOneView | hpOneView/resources/settings/backups.py | Backups.update_remote_archive | def update_remote_archive(self, save_uri, timeout=-1):
"""
Saves a backup of the appliance to a previously-configured remote location.
Args:
save_uri (dict): The URI for saving the backup to a previously configured location.
timeout:
Timeout in seconds. W... | python | def update_remote_archive(self, save_uri, timeout=-1):
"""
Saves a backup of the appliance to a previously-configured remote location.
Args:
save_uri (dict): The URI for saving the backup to a previously configured location.
timeout:
Timeout in seconds. W... | [
"def",
"update_remote_archive",
"(",
"self",
",",
"save_uri",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_client",
".",
"update_with_zero_body",
"(",
"uri",
"=",
"save_uri",
",",
"timeout",
"=",
"timeout",
")"
] | Saves a backup of the appliance to a previously-configured remote location.
Args:
save_uri (dict): The URI for saving the backup to a previously configured location.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operatio... | [
"Saves",
"a",
"backup",
"of",
"the",
"appliance",
"to",
"a",
"previously",
"-",
"configured",
"remote",
"location",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/backups.py#L141-L155 |
18,575 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/uplink_sets.py | UplinkSets.get_ethernet_networks | def get_ethernet_networks(self):
"""
Gets a list of associated ethernet networks of an uplink set.
Args:
id_or_uri: Can be either the uplink set id or the uplink set uri.
Returns:
list: Associated ethernet networks.
"""
network_uris = self.data.g... | python | def get_ethernet_networks(self):
"""
Gets a list of associated ethernet networks of an uplink set.
Args:
id_or_uri: Can be either the uplink set id or the uplink set uri.
Returns:
list: Associated ethernet networks.
"""
network_uris = self.data.g... | [
"def",
"get_ethernet_networks",
"(",
"self",
")",
":",
"network_uris",
"=",
"self",
".",
"data",
".",
"get",
"(",
"'networkUris'",
")",
"networks",
"=",
"[",
"]",
"if",
"network_uris",
":",
"for",
"uri",
"in",
"network_uris",
":",
"networks",
".",
"append"... | Gets a list of associated ethernet networks of an uplink set.
Args:
id_or_uri: Can be either the uplink set id or the uplink set uri.
Returns:
list: Associated ethernet networks. | [
"Gets",
"a",
"list",
"of",
"associated",
"ethernet",
"networks",
"of",
"an",
"uplink",
"set",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/uplink_sets.py#L60-L75 |
18,576 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/uplink_sets.py | UplinkSets.__set_ethernet_uris | def __set_ethernet_uris(self, ethernet_names, operation="add"):
"""Updates network uris."""
if not isinstance(ethernet_names, list):
ethernet_names = [ethernet_names]
associated_enets = self.data.get('networkUris', [])
ethernet_uris = []
for i, enet in enumerate(eth... | python | def __set_ethernet_uris(self, ethernet_names, operation="add"):
"""Updates network uris."""
if not isinstance(ethernet_names, list):
ethernet_names = [ethernet_names]
associated_enets = self.data.get('networkUris', [])
ethernet_uris = []
for i, enet in enumerate(eth... | [
"def",
"__set_ethernet_uris",
"(",
"self",
",",
"ethernet_names",
",",
"operation",
"=",
"\"add\"",
")",
":",
"if",
"not",
"isinstance",
"(",
"ethernet_names",
",",
"list",
")",
":",
"ethernet_names",
"=",
"[",
"ethernet_names",
"]",
"associated_enets",
"=",
"... | Updates network uris. | [
"Updates",
"network",
"uris",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/uplink_sets.py#L110-L134 |
18,577 | HewlettPackard/python-hpOneView | hpOneView/resources/networking/logical_interconnect_groups.py | LogicalInterconnectGroups.get_settings | def get_settings(self):
"""
Gets the interconnect settings for a logical interconnect group.
Returns:
dict: Interconnect Settings.
"""
uri = "{}/settings".format(self.data["uri"])
return self._helper.do_get(uri) | python | def get_settings(self):
"""
Gets the interconnect settings for a logical interconnect group.
Returns:
dict: Interconnect Settings.
"""
uri = "{}/settings".format(self.data["uri"])
return self._helper.do_get(uri) | [
"def",
"get_settings",
"(",
"self",
")",
":",
"uri",
"=",
"\"{}/settings\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"\"uri\"",
"]",
")",
"return",
"self",
".",
"_helper",
".",
"do_get",
"(",
"uri",
")"
] | Gets the interconnect settings for a logical interconnect group.
Returns:
dict: Interconnect Settings. | [
"Gets",
"the",
"interconnect",
"settings",
"for",
"a",
"logical",
"interconnect",
"group",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/networking/logical_interconnect_groups.py#L93-L101 |
18,578 | HewlettPackard/python-hpOneView | hpOneView/resources/settings/firmware_bundles.py | FirmwareBundles.upload | def upload(self, file_path, timeout=-1):
"""
Upload an SPP ISO image file or a hotfix file to the appliance.
The API supports upload of one hotfix at a time into the system.
For the successful upload of a hotfix, ensure its original name and extension are not altered.
Args:
... | python | def upload(self, file_path, timeout=-1):
"""
Upload an SPP ISO image file or a hotfix file to the appliance.
The API supports upload of one hotfix at a time into the system.
For the successful upload of a hotfix, ensure its original name and extension are not altered.
Args:
... | [
"def",
"upload",
"(",
"self",
",",
"file_path",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_client",
".",
"upload",
"(",
"file_path",
",",
"timeout",
"=",
"timeout",
")"
] | Upload an SPP ISO image file or a hotfix file to the appliance.
The API supports upload of one hotfix at a time into the system.
For the successful upload of a hotfix, ensure its original name and extension are not altered.
Args:
file_path: Full path to firmware.
timeout... | [
"Upload",
"an",
"SPP",
"ISO",
"image",
"file",
"or",
"a",
"hotfix",
"file",
"to",
"the",
"appliance",
".",
"The",
"API",
"supports",
"upload",
"of",
"one",
"hotfix",
"at",
"a",
"time",
"into",
"the",
"system",
".",
"For",
"the",
"successful",
"upload",
... | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/settings/firmware_bundles.py#L48-L62 |
18,579 | HewlettPackard/python-hpOneView | hpOneView/resources/search/index_resources.py | IndexResources.get | def get(self, uri):
"""
Gets an index resource by URI.
Args:
uri: The resource URI.
Returns:
dict: The index resource.
"""
uri = self.URI + uri
return self._client.get(uri) | python | def get(self, uri):
"""
Gets an index resource by URI.
Args:
uri: The resource URI.
Returns:
dict: The index resource.
"""
uri = self.URI + uri
return self._client.get(uri) | [
"def",
"get",
"(",
"self",
",",
"uri",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"uri",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"uri",
")"
] | Gets an index resource by URI.
Args:
uri: The resource URI.
Returns:
dict: The index resource. | [
"Gets",
"an",
"index",
"resource",
"by",
"URI",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/search/index_resources.py#L104-L115 |
18,580 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/storage_pools.py | StoragePools.get_reachable_storage_pools | def get_reachable_storage_pools(self, start=0, count=-1, filter='', query='', sort='',
networks=None, scope_exclusions=None, scope_uris=''):
"""
Gets the storage pools that are connected on the specified networks
based on the storage system port's expected net... | python | def get_reachable_storage_pools(self, start=0, count=-1, filter='', query='', sort='',
networks=None, scope_exclusions=None, scope_uris=''):
"""
Gets the storage pools that are connected on the specified networks
based on the storage system port's expected net... | [
"def",
"get_reachable_storage_pools",
"(",
"self",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"query",
"=",
"''",
",",
"sort",
"=",
"''",
",",
"networks",
"=",
"None",
",",
"scope_exclusions",
"=",
"None",
","... | Gets the storage pools that are connected on the specified networks
based on the storage system port's expected network connectivity.
Args:
start: The first item to return, using 0-based indexing. If not specified,
the default is 0 - start with the first available item.
... | [
"Gets",
"the",
"storage",
"pools",
"that",
"are",
"connected",
"on",
"the",
"specified",
"networks",
"based",
"on",
"the",
"storage",
"system",
"port",
"s",
"expected",
"network",
"connectivity",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_pools.py#L138-L181 |
18,581 | HewlettPackard/python-hpOneView | hpOneView/resources/security/certificate_rabbitmq.py | CertificateRabbitMQ.generate | def generate(self, information, timeout=-1):
"""
Generates a self signed certificate or an internal CA signed certificate for RabbitMQ clients.
Args:
information (dict): Information to generate the certificate for RabbitMQ clients.
timeout:
Timeout in sec... | python | def generate(self, information, timeout=-1):
"""
Generates a self signed certificate or an internal CA signed certificate for RabbitMQ clients.
Args:
information (dict): Information to generate the certificate for RabbitMQ clients.
timeout:
Timeout in sec... | [
"def",
"generate",
"(",
"self",
",",
"information",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"return",
"self",
".",
"_client",
".",
"create",
"(",
"information",
",",
"timeout",
"=",
"timeout",
")"
] | Generates a self signed certificate or an internal CA signed certificate for RabbitMQ clients.
Args:
information (dict): Information to generate the certificate for RabbitMQ clients.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not a... | [
"Generates",
"a",
"self",
"signed",
"certificate",
"or",
"an",
"internal",
"CA",
"signed",
"certificate",
"for",
"RabbitMQ",
"clients",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/certificate_rabbitmq.py#L44-L57 |
18,582 | HewlettPackard/python-hpOneView | hpOneView/resources/security/certificate_rabbitmq.py | CertificateRabbitMQ.get_key_pair | def get_key_pair(self, alias_name):
"""
Retrieves the public and private key pair associated with the specified alias name.
Args:
alias_name: Key pair associated with the RabbitMQ
Returns:
dict: RabbitMQ certificate
"""
uri = self.URI + "/keypair... | python | def get_key_pair(self, alias_name):
"""
Retrieves the public and private key pair associated with the specified alias name.
Args:
alias_name: Key pair associated with the RabbitMQ
Returns:
dict: RabbitMQ certificate
"""
uri = self.URI + "/keypair... | [
"def",
"get_key_pair",
"(",
"self",
",",
"alias_name",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"\"/keypair/\"",
"+",
"alias_name",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"uri",
")"
] | Retrieves the public and private key pair associated with the specified alias name.
Args:
alias_name: Key pair associated with the RabbitMQ
Returns:
dict: RabbitMQ certificate | [
"Retrieves",
"the",
"public",
"and",
"private",
"key",
"pair",
"associated",
"with",
"the",
"specified",
"alias",
"name",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/certificate_rabbitmq.py#L71-L82 |
18,583 | HewlettPackard/python-hpOneView | hpOneView/resources/security/certificate_rabbitmq.py | CertificateRabbitMQ.get_keys | def get_keys(self, alias_name, key_format):
"""
Retrieves the contents of PKCS12 file in the format specified.
This PKCS12 formatted file contains both the certificate as well as the key file data.
Valid key formats are Base64 and PKCS12.
Args:
alias_name: Key pair a... | python | def get_keys(self, alias_name, key_format):
"""
Retrieves the contents of PKCS12 file in the format specified.
This PKCS12 formatted file contains both the certificate as well as the key file data.
Valid key formats are Base64 and PKCS12.
Args:
alias_name: Key pair a... | [
"def",
"get_keys",
"(",
"self",
",",
"alias_name",
",",
"key_format",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"\"/keys/\"",
"+",
"alias_name",
"+",
"\"?format=\"",
"+",
"key_format",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"uri",
")"
] | Retrieves the contents of PKCS12 file in the format specified.
This PKCS12 formatted file contains both the certificate as well as the key file data.
Valid key formats are Base64 and PKCS12.
Args:
alias_name: Key pair associated with the RabbitMQ
key_format: Valid key fo... | [
"Retrieves",
"the",
"contents",
"of",
"PKCS12",
"file",
"in",
"the",
"format",
"specified",
".",
"This",
"PKCS12",
"formatted",
"file",
"contains",
"both",
"the",
"certificate",
"as",
"well",
"as",
"the",
"key",
"file",
"data",
".",
"Valid",
"key",
"formats"... | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/security/certificate_rabbitmq.py#L84-L97 |
18,584 | HewlettPackard/python-hpOneView | hpOneView/resources/servers/id_pools.py | IdPools.validate_id_pool | def validate_id_pool(self, id_or_uri, ids_pools):
"""
Validates an ID pool.
Args:
id_or_uri:
ID or URI of range.
ids_pools (list):
List of Id Pools.
Returns:
dict: A dict containing a list with IDs.
"""
... | python | def validate_id_pool(self, id_or_uri, ids_pools):
"""
Validates an ID pool.
Args:
id_or_uri:
ID or URI of range.
ids_pools (list):
List of Id Pools.
Returns:
dict: A dict containing a list with IDs.
"""
... | [
"def",
"validate_id_pool",
"(",
"self",
",",
"id_or_uri",
",",
"ids_pools",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
")",
"+",
"\"/validate?idList=\"",
"+",
"\"&idList=\"",
".",
"join",
"(",
"ids_pools",
")",
"return"... | Validates an ID pool.
Args:
id_or_uri:
ID or URI of range.
ids_pools (list):
List of Id Pools.
Returns:
dict: A dict containing a list with IDs. | [
"Validates",
"an",
"ID",
"pool",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/id_pools.py#L73-L87 |
18,585 | HewlettPackard/python-hpOneView | hpOneView/resources/servers/id_pools.py | IdPools.generate | def generate(self, id_or_uri):
"""
Generates and returns a random range.
Args:
id_or_uri:
ID or URI of range.
Returns:
dict: A dict containing a list with IDs.
"""
uri = self._client.build_uri(id_or_uri) + "/generate"
retu... | python | def generate(self, id_or_uri):
"""
Generates and returns a random range.
Args:
id_or_uri:
ID or URI of range.
Returns:
dict: A dict containing a list with IDs.
"""
uri = self._client.build_uri(id_or_uri) + "/generate"
retu... | [
"def",
"generate",
"(",
"self",
",",
"id_or_uri",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
")",
"+",
"\"/generate\"",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"uri",
")"
] | Generates and returns a random range.
Args:
id_or_uri:
ID or URI of range.
Returns:
dict: A dict containing a list with IDs. | [
"Generates",
"and",
"returns",
"a",
"random",
"range",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/id_pools.py#L169-L181 |
18,586 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/storage_volume_templates.py | StorageVolumeTemplates.get_connectable_volume_templates | def get_connectable_volume_templates(self, start=0, count=-1, filter='', query='', sort=''):
"""
Gets the storage volume templates that are available on the specified networks based on the storage system
port's expected network connectivity. If there are no storage volume templates that meet the... | python | def get_connectable_volume_templates(self, start=0, count=-1, filter='', query='', sort=''):
"""
Gets the storage volume templates that are available on the specified networks based on the storage system
port's expected network connectivity. If there are no storage volume templates that meet the... | [
"def",
"get_connectable_volume_templates",
"(",
"self",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"query",
"=",
"''",
",",
"sort",
"=",
"''",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"\"/connectable-vol... | Gets the storage volume templates that are available on the specified networks based on the storage system
port's expected network connectivity. If there are no storage volume templates that meet the specified
connectivity criteria, an empty collection will be returned.
Returns:
lis... | [
"Gets",
"the",
"storage",
"volume",
"templates",
"that",
"are",
"available",
"on",
"the",
"specified",
"networks",
"based",
"on",
"the",
"storage",
"system",
"port",
"s",
"expected",
"network",
"connectivity",
".",
"If",
"there",
"are",
"no",
"storage",
"volum... | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_volume_templates.py#L107-L120 |
18,587 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/storage_volume_templates.py | StorageVolumeTemplates.get_reachable_volume_templates | def get_reachable_volume_templates(self, start=0, count=-1, filter='', query='', sort='',
networks=None, scope_uris='', private_allowed_only=False):
"""
Gets the storage templates that are connected on the specified networks based on the storage system
port... | python | def get_reachable_volume_templates(self, start=0, count=-1, filter='', query='', sort='',
networks=None, scope_uris='', private_allowed_only=False):
"""
Gets the storage templates that are connected on the specified networks based on the storage system
port... | [
"def",
"get_reachable_volume_templates",
"(",
"self",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"query",
"=",
"''",
",",
"sort",
"=",
"''",
",",
"networks",
"=",
"None",
",",
"scope_uris",
"=",
"''",
",",
"... | Gets the storage templates that are connected on the specified networks based on the storage system
port's expected network connectivity.
Returns:
list: Storage volume templates. | [
"Gets",
"the",
"storage",
"templates",
"that",
"are",
"connected",
"on",
"the",
"specified",
"networks",
"based",
"on",
"the",
"storage",
"system",
"port",
"s",
"expected",
"network",
"connectivity",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_volume_templates.py#L122-L137 |
18,588 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/storage_volume_templates.py | StorageVolumeTemplates.get_compatible_systems | def get_compatible_systems(self, id_or_uri):
"""
Retrieves a collection of all storage systems that is applicable to this storage volume template.
Args:
id_or_uri:
Can be either the power device id or the uri
Returns:
list: Storage systems.
... | python | def get_compatible_systems(self, id_or_uri):
"""
Retrieves a collection of all storage systems that is applicable to this storage volume template.
Args:
id_or_uri:
Can be either the power device id or the uri
Returns:
list: Storage systems.
... | [
"def",
"get_compatible_systems",
"(",
"self",
",",
"id_or_uri",
")",
":",
"uri",
"=",
"self",
".",
"_client",
".",
"build_uri",
"(",
"id_or_uri",
")",
"+",
"\"/compatible-systems\"",
"return",
"self",
".",
"_client",
".",
"get",
"(",
"uri",
")"
] | Retrieves a collection of all storage systems that is applicable to this storage volume template.
Args:
id_or_uri:
Can be either the power device id or the uri
Returns:
list: Storage systems. | [
"Retrieves",
"a",
"collection",
"of",
"all",
"storage",
"systems",
"that",
"is",
"applicable",
"to",
"this",
"storage",
"volume",
"template",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/storage_volume_templates.py#L139-L151 |
18,589 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.add_from_existing | def add_from_existing(self, resource, timeout=-1):
"""
Adds a volume that already exists in the Storage system
Args:
resource (dict):
Object to create.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not ... | python | def add_from_existing(self, resource, timeout=-1):
"""
Adds a volume that already exists in the Storage system
Args:
resource (dict):
Object to create.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not ... | [
"def",
"add_from_existing",
"(",
"self",
",",
"resource",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"\"/from-existing\"",
"return",
"self",
".",
"_client",
".",
"create",
"(",
"resource",
",",
"uri",
"=",
"uri",
",",... | Adds a volume that already exists in the Storage system
Args:
resource (dict):
Object to create.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneView, just stop waiting for i... | [
"Adds",
"a",
"volume",
"that",
"already",
"exists",
"in",
"the",
"Storage",
"system"
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L136-L151 |
18,590 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.create_from_snapshot | def create_from_snapshot(self, data, timeout=-1):
"""
Creates a new volume on the storage system from a snapshot of a volume.
A volume template must also be specified when creating a volume from a snapshot.
The global setting "StorageVolumeTemplateRequired" controls whether or
n... | python | def create_from_snapshot(self, data, timeout=-1):
"""
Creates a new volume on the storage system from a snapshot of a volume.
A volume template must also be specified when creating a volume from a snapshot.
The global setting "StorageVolumeTemplateRequired" controls whether or
n... | [
"def",
"create_from_snapshot",
"(",
"self",
",",
"data",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"\"/from-snapshot\"",
"return",
"self",
".",
"_client",
".",
"create",
"(",
"data",
",",
"uri",
"=",
"uri",
",",
"t... | Creates a new volume on the storage system from a snapshot of a volume.
A volume template must also be specified when creating a volume from a snapshot.
The global setting "StorageVolumeTemplateRequired" controls whether or
not root volume templates can be used to provision volumes.
The... | [
"Creates",
"a",
"new",
"volume",
"on",
"the",
"storage",
"system",
"from",
"a",
"snapshot",
"of",
"a",
"volume",
".",
"A",
"volume",
"template",
"must",
"also",
"be",
"specified",
"when",
"creating",
"a",
"volume",
"from",
"a",
"snapshot",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L153-L175 |
18,591 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.delete | def delete(self, resource, force=False, export_only=None, suppress_device_updates=None, timeout=-1):
"""
Deletes a managed volume.
Args:
resource (dict):
Object to delete.
force:
If set to true, the operation completes despite any problem... | python | def delete(self, resource, force=False, export_only=None, suppress_device_updates=None, timeout=-1):
"""
Deletes a managed volume.
Args:
resource (dict):
Object to delete.
force:
If set to true, the operation completes despite any problem... | [
"def",
"delete",
"(",
"self",
",",
"resource",
",",
"force",
"=",
"False",
",",
"export_only",
"=",
"None",
",",
"suppress_device_updates",
"=",
"None",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"custom_headers",
"=",
"{",
"'If-Match'",
":",
"'*'",
"}",
... | Deletes a managed volume.
Args:
resource (dict):
Object to delete.
force:
If set to true, the operation completes despite any problems with
network connectivity or errors on the resource itself. The default is false.
timeout:... | [
"Deletes",
"a",
"managed",
"volume",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L197-L231 |
18,592 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.get_snapshots | def get_snapshots(self, volume_id_or_uri, start=0, count=-1, filter='', sort=''):
"""
Gets all snapshots of a volume. Returns a list of snapshots based on optional sorting and filtering, and
constrained by start and count parameters.
Args:
volume_id_or_uri:
C... | python | def get_snapshots(self, volume_id_or_uri, start=0, count=-1, filter='', sort=''):
"""
Gets all snapshots of a volume. Returns a list of snapshots based on optional sorting and filtering, and
constrained by start and count parameters.
Args:
volume_id_or_uri:
C... | [
"def",
"get_snapshots",
"(",
"self",
",",
"volume_id_or_uri",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"sort",
"=",
"''",
")",
":",
"uri",
"=",
"self",
".",
"__build_volume_snapshot_uri",
"(",
"volume_id_or_uri"... | Gets all snapshots of a volume. Returns a list of snapshots based on optional sorting and filtering, and
constrained by start and count parameters.
Args:
volume_id_or_uri:
Can be either the volume id or the volume uri.
start:
The first item to ret... | [
"Gets",
"all",
"snapshots",
"of",
"a",
"volume",
".",
"Returns",
"a",
"list",
"of",
"snapshots",
"based",
"on",
"optional",
"sorting",
"and",
"filtering",
"and",
"constrained",
"by",
"start",
"and",
"count",
"parameters",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L242-L268 |
18,593 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.create_snapshot | def create_snapshot(self, volume_id_or_uri, snapshot, timeout=-1):
"""
Creates a snapshot for the specified volume.
Args:
volume_id_or_uri:
Can be either the volume ID or the volume URI.
snapshot (dict):
Object to create.
timeo... | python | def create_snapshot(self, volume_id_or_uri, snapshot, timeout=-1):
"""
Creates a snapshot for the specified volume.
Args:
volume_id_or_uri:
Can be either the volume ID or the volume URI.
snapshot (dict):
Object to create.
timeo... | [
"def",
"create_snapshot",
"(",
"self",
",",
"volume_id_or_uri",
",",
"snapshot",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"self",
".",
"__build_volume_snapshot_uri",
"(",
"volume_id_or_uri",
")",
"return",
"self",
".",
"_client",
".",
"create",
"... | Creates a snapshot for the specified volume.
Args:
volume_id_or_uri:
Can be either the volume ID or the volume URI.
snapshot (dict):
Object to create.
timeout:
Timeout in seconds. Wait for task completion by default. The timeou... | [
"Creates",
"a",
"snapshot",
"for",
"the",
"specified",
"volume",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L270-L288 |
18,594 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.get_snapshot | def get_snapshot(self, snapshot_id_or_uri, volume_id_or_uri=None):
"""
Gets a snapshot of a volume.
Args:
volume_id_or_uri:
Can be either the volume ID or the volume URI. It is optional if it is passed a snapshot URI,
but required if it passed a snaps... | python | def get_snapshot(self, snapshot_id_or_uri, volume_id_or_uri=None):
"""
Gets a snapshot of a volume.
Args:
volume_id_or_uri:
Can be either the volume ID or the volume URI. It is optional if it is passed a snapshot URI,
but required if it passed a snaps... | [
"def",
"get_snapshot",
"(",
"self",
",",
"snapshot_id_or_uri",
",",
"volume_id_or_uri",
"=",
"None",
")",
":",
"uri",
"=",
"self",
".",
"__build_volume_snapshot_uri",
"(",
"volume_id_or_uri",
",",
"snapshot_id_or_uri",
")",
"return",
"self",
".",
"_client",
".",
... | Gets a snapshot of a volume.
Args:
volume_id_or_uri:
Can be either the volume ID or the volume URI. It is optional if it is passed a snapshot URI,
but required if it passed a snapshot ID.
snapshot_id_or_uri:
Can be either the snapshot ID o... | [
"Gets",
"a",
"snapshot",
"of",
"a",
"volume",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L290-L305 |
18,595 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.get_snapshot_by | def get_snapshot_by(self, volume_id_or_uri, field, value):
"""
Gets all snapshots that match the filter.
The search is case-insensitive.
Args:
volume_id_or_uri: Can be either the volume id or the volume uri.
field: Field name to filter.
value: Value ... | python | def get_snapshot_by(self, volume_id_or_uri, field, value):
"""
Gets all snapshots that match the filter.
The search is case-insensitive.
Args:
volume_id_or_uri: Can be either the volume id or the volume uri.
field: Field name to filter.
value: Value ... | [
"def",
"get_snapshot_by",
"(",
"self",
",",
"volume_id_or_uri",
",",
"field",
",",
"value",
")",
":",
"uri",
"=",
"self",
".",
"__build_volume_snapshot_uri",
"(",
"volume_id_or_uri",
")",
"return",
"self",
".",
"_client",
".",
"get_by",
"(",
"field",
",",
"v... | Gets all snapshots that match the filter.
The search is case-insensitive.
Args:
volume_id_or_uri: Can be either the volume id or the volume uri.
field: Field name to filter.
value: Value to filter.
Returns:
list: Snapshots | [
"Gets",
"all",
"snapshots",
"that",
"match",
"the",
"filter",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L327-L342 |
18,596 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.get_extra_managed_storage_volume_paths | def get_extra_managed_storage_volume_paths(self, start=0, count=-1, filter='', sort=''):
"""
Gets the list of extra managed storage volume paths.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start... | python | def get_extra_managed_storage_volume_paths(self, start=0, count=-1, filter='', sort=''):
"""
Gets the list of extra managed storage volume paths.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start... | [
"def",
"get_extra_managed_storage_volume_paths",
"(",
"self",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"sort",
"=",
"''",
")",
":",
"uri",
"=",
"self",
".",
"URI",
"+",
"'/repair?alertFixType=ExtraManagedStorageVolu... | Gets the list of extra managed storage volume paths.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start with the first available item.
count:
The number of resources to return. A count... | [
"Gets",
"the",
"list",
"of",
"extra",
"managed",
"storage",
"volume",
"paths",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L344-L367 |
18,597 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.repair | def repair(self, volume_id_or_uri, timeout=-1):
"""
Removes extra presentations from a specified volume on the storage system.
Args:
volume_id_or_uri:
Can be either the volume id or the volume uri.
timeout:
Timeout in seconds. Wait for tas... | python | def repair(self, volume_id_or_uri, timeout=-1):
"""
Removes extra presentations from a specified volume on the storage system.
Args:
volume_id_or_uri:
Can be either the volume id or the volume uri.
timeout:
Timeout in seconds. Wait for tas... | [
"def",
"repair",
"(",
"self",
",",
"volume_id_or_uri",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"data",
"=",
"{",
"\"type\"",
":",
"\"ExtraManagedStorageVolumePaths\"",
",",
"\"resourceUri\"",
":",
"self",
".",
"_client",
".",
"build_uri",
"(",
"volume_id_or_u... | Removes extra presentations from a specified volume on the storage system.
Args:
volume_id_or_uri:
Can be either the volume id or the volume uri.
timeout:
Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in... | [
"Removes",
"extra",
"presentations",
"from",
"a",
"specified",
"volume",
"on",
"the",
"storage",
"system",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L369-L389 |
18,598 | HewlettPackard/python-hpOneView | hpOneView/resources/storage/volumes.py | Volumes.get_attachable_volumes | def get_attachable_volumes(self, start=0, count=-1, filter='', query='', sort='', scope_uris='', connections=''):
"""
Gets the volumes that are connected on the specified networks based on the storage system port's expected
network connectivity.
A volume is attachable if it satisfies ei... | python | def get_attachable_volumes(self, start=0, count=-1, filter='', query='', sort='', scope_uris='', connections=''):
"""
Gets the volumes that are connected on the specified networks based on the storage system port's expected
network connectivity.
A volume is attachable if it satisfies ei... | [
"def",
"get_attachable_volumes",
"(",
"self",
",",
"start",
"=",
"0",
",",
"count",
"=",
"-",
"1",
",",
"filter",
"=",
"''",
",",
"query",
"=",
"''",
",",
"sort",
"=",
"''",
",",
"scope_uris",
"=",
"''",
",",
"connections",
"=",
"''",
")",
":",
"... | Gets the volumes that are connected on the specified networks based on the storage system port's expected
network connectivity.
A volume is attachable if it satisfies either of the following conditions:
* The volume is shareable.
* The volume not shareable and not attached.
... | [
"Gets",
"the",
"volumes",
"that",
"are",
"connected",
"on",
"the",
"specified",
"networks",
"based",
"on",
"the",
"storage",
"system",
"port",
"s",
"expected",
"network",
"connectivity",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/storage/volumes.py#L391-L429 |
18,599 | HewlettPackard/python-hpOneView | hpOneView/resources/servers/enclosures.py | Enclosures.update_configuration | def update_configuration(self, timeout=-1):
"""
Reapplies the appliance's configuration on the enclosure. This includes running the same configure steps
that were performed as part of the enclosure add.
Args:
timeout: Timeout in seconds. Wait for task completion by default. ... | python | def update_configuration(self, timeout=-1):
"""
Reapplies the appliance's configuration on the enclosure. This includes running the same configure steps
that were performed as part of the enclosure add.
Args:
timeout: Timeout in seconds. Wait for task completion by default. ... | [
"def",
"update_configuration",
"(",
"self",
",",
"timeout",
"=",
"-",
"1",
")",
":",
"uri",
"=",
"\"{}/configuration\"",
".",
"format",
"(",
"self",
".",
"data",
"[",
"'uri'",
"]",
")",
"return",
"self",
".",
"update_with_zero_body",
"(",
"uri",
"=",
"ur... | Reapplies the appliance's configuration on the enclosure. This includes running the same configure steps
that were performed as part of the enclosure add.
Args:
timeout: Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation
in OneV... | [
"Reapplies",
"the",
"appliance",
"s",
"configuration",
"on",
"the",
"enclosure",
".",
"This",
"includes",
"running",
"the",
"same",
"configure",
"steps",
"that",
"were",
"performed",
"as",
"part",
"of",
"the",
"enclosure",
"add",
"."
] | 3c6219723ef25e6e0c83d44a89007f89bc325b89 | https://github.com/HewlettPackard/python-hpOneView/blob/3c6219723ef25e6e0c83d44a89007f89bc325b89/hpOneView/resources/servers/enclosures.py#L106-L119 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.