hpeOneView.resources.networking package
Submodules
hpeOneView.resources.networking.connection_templates module
hpeOneView.resources.networking.ethernet_networks module
- class hpeOneView.resources.networking.ethernet_networks.EthernetNetworks(connection, data=None)[source]
Bases:
ResourcePatchMixin
,Resource
Ethernet Networks API client.
- BULK_DEFAULT_VALUES = {'1000': {'type': 'bulk-ethernet-networkV1'}, '1200': {'type': 'bulk-ethernet-networkV2'}, '1600': {'type': 'bulk-ethernet-networkV2'}, '1800': {'type': 'bulk-ethernet-networkV2'}, '200': {'type': 'bulk-ethernet-network'}, '300': {'type': 'bulk-ethernet-network'}, '500': {'type': 'bulk-ethernet-network'}, '600': {'type': 'bulk-ethernet-networkV1'}, '800': {'type': 'bulk-ethernet-networkV1'}}
- DEFAULT_VALUES = {'1000': {'type': 'ethernet-networkV4'}, '1200': {'type': 'ethernet-networkV4'}, '1600': {'type': 'ethernet-networkV4'}, '1800': {'type': 'ethernet-networkV4'}, '200': {'type': 'ethernet-networkV3'}, '300': {'type': 'ethernet-networkV300'}, '500': {'type': 'ethernet-networkV300'}, '600': {'type': 'ethernet-networkV4'}, '800': {'type': 'ethernet-networkV4'}}
- URI = '/rest/ethernet-networks'
- create_bulk(resource, timeout=-1)[source]
Creates bulk Ethernet networks.
- Parameters
resource (dict) – Specifications to create in bulk.
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
List of created Ethernet Networks.
- Return type
list
- delete_bulk(resource, timeout=-1)[source]
Deletes bulk Ethernet networks.
- Parameters
resource (dict) – Specifications to delete in bulk.
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.
- dissociate_values_or_ranges(vlan_id_range)[source]
Build a list of vlan ids given a combination of ranges and/or values
Examples
>>> enet.dissociate_values_or_ranges('1-2,5') [1, 2, 5]
>>> enet.dissociate_values_or_ranges('5') [1, 2, 3, 4, 5]
>>> enet.dissociate_values_or_ranges('4-5,7-8') [4, 5, 7, 8]
- Parameters
vlan_id_range – A combination of values or ranges. For example, ‘1-10,50,51,500-700’.
- Returns
vlan ids
- Return type
list
- get_associated_profiles(**kwargs)
- get_associated_uplink_groups(**kwargs)
- get_range(name_prefix, vlan_id_range)[source]
Gets a list of Ethernet Networks that match the ‘given name_prefix’ and the ‘vlan_id_range’.
Examples
>>> enet.get_range('Enet_name', '1-2,5') # The result contains the ethernet network with names: ['Enet_name_1', 'Enet_name_2', 'Enet_name_5']
>>> enet.get_range('Enet_name', '2') # The result contains the ethernet network with names: ['Enet_name_1', 'Enet_name_2']
- Parameters
name_prefix – The Ethernet Network prefix
vlan_id_range – A combination of values or ranges to be retrieved. For example, ‘1-10,50,51,500-700’.
- Returns
A list of Ethernet Networks.
- Return type
list
hpeOneView.resources.networking.fabrics module
- class hpeOneView.resources.networking.fabrics.Fabrics(con)[source]
Bases:
object
Fabrics API client.
- DEFAULT_VALUES = {'300': {'type': 'vlan-pool'}, '500': {'type': 'vlan-pool'}}
- URI = '/rest/fabrics'
- get(id_or_uri)[source]
Gets the fabric with the specified ID.
- Parameters
id_or_uri – ID or URI of fabric.
- Returns
The fabric.
- Return type
dict
- get_all(start=0, count=-1, filter='', sort='')[source]
Gets a paginated collection of all fabrics based on the specified parameters.
Filters can be used in the URL to control the number of fabrics that are returned. With no filters specified, the API returns all supported fabrics.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
- Returns
A list of fabrics.
- Return type
list
- get_by(field, value)[source]
Gets all fabrics that match the filter.
The search is case-insensitive.
- Parameters
field – Field name to filter.
value – Value to filter.
- Returns
A list of fabrics.
- Return type
list
- get_reserved_vlan_range(id_or_uri)[source]
Gets the reserved vlan ID range for the fabric.
Note
This method is only available on HPE Synergy.
- Parameters
id_or_uri – ID or URI of fabric.
- Returns
vlan-pool
- Return type
dict
- update_reserved_vlan_range(id_or_uri, vlan_pool, force=False)[source]
Updates the reserved vlan ID range for the fabric.
Note
This method is only available on HPE Synergy.
- Parameters
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 with network connectivity or errors on the resource itself. The default is false.
- Returns
The fabric
- Return type
dict
hpeOneView.resources.networking.fc_networks module
- class hpeOneView.resources.networking.fc_networks.FcNetworks(connection, data=None)[source]
Bases:
ResourcePatchMixin
,Resource
Fibre Channel networks API client.
- DEFAULT_VALUES = {'1000': {'type': 'fc-networkV4'}, '1200': {'type': 'fc-networkV4'}, '1600': {'type': 'fc-networkV4'}, '1800': {'type': 'fc-networkV4'}, '200': {'type': 'fc-networkV2'}, '300': {'type': 'fc-networkV300'}, '500': {'type': 'fc-networkV300'}, '600': {'type': 'fc-networkV4'}, '800': {'type': 'fc-networkV4'}}
- URI = '/rest/fc-networks'
hpeOneView.resources.networking.fcoe_networks module
- class hpeOneView.resources.networking.fcoe_networks.FcoeNetworks(connection, data=None)[source]
Bases:
ResourcePatchMixin
,Resource
FCoE Networks API client.
- DEFAULT_VALUES = {'1000': {'type': 'fcoe-networkV4'}, '1200': {'type': 'fcoe-networkV4'}, '1600': {'type': 'fcoe-networkV4'}, '1800': {'type': 'fcoe-networkV4'}, '200': {'type': 'fcoe-network'}, '300': {'type': 'fcoe-networkV300'}, '500': {'type': 'fcoe-networkV300'}, '600': {'type': 'fcoe-networkV4'}, '800': {'type': 'fcoe-networkV4'}}
- URI = '/rest/fcoe-networks'
hpeOneView.resources.networking.interconnect_link_topologies module
- class hpeOneView.resources.networking.interconnect_link_topologies.InterconnectLinkTopologies(con)[source]
Bases:
object
Interconnect Link Topologies API client.
Note
This resource is only available on HPE Synergy.
- URI = '/rest/interconnect-link-topologies'
- get(id_or_uri)[source]
Gets an interconnect link topology by ID or by URI.
- Parameters
id_or_uri – Can be either the interconnect type id or the interconnect type uri.
- Returns
The interconnect link topology.
- Return type
dict
- get_all(start=0, count=-1, filter='', sort='')[source]
Gets a paginated collection of all the interconnect link topologies based on the specified parameters.
Filters can be used in the URL to control the number of interconnect link topologies that are returned. With no filters specified, the API returns all interconnect link toplogies.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
- Returns
A list of interconnect link topologies.
- Return type
list
hpeOneView.resources.networking.interconnect_types module
hpeOneView.resources.networking.interconnects module
- class hpeOneView.resources.networking.interconnects.Interconnects(connection, data=None)[source]
Bases:
ResourcePatchMixin
,Resource
Interconnects API client.
- URI = '/rest/interconnects'
- get_name_servers()[source]
Gets the named servers for an interconnect.
- Returns
the name servers for an interconnect.
- Return type
dict
- get_pluggable_module_information()[source]
Gets all the pluggable module information.
- Returns
dicts of the pluggable module information.
- Return type
array
- get_port(port_id_or_uri)[source]
Gets an interconnect port.
- Parameters
port_id_or_uri – The interconnect port id or uri.
- Returns
The interconnect port.
- Return type
dict
- get_ports(start=0, count=-1)[source]
Gets all interconnect ports.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
- Returns
All interconnect ports.
- Return type
list
- get_statistics(port_name='')[source]
Gets the statistics from an interconnect.
- Parameters
port_name (str) – A specific port name of an interconnect.
- Returns
The statistics for the interconnect that matches id.
- Return type
dict
- get_subport_statistics(port_name, subport_number)[source]
Gets the subport statistics on an interconnect.
- Parameters
port_name (str) – A specific port name of an interconnect.
subport_number (int) – The subport.
- Returns
The statistics for the interconnect that matches id, port_name, and subport_number.
- Return type
dict
- reset_port_protection(timeout=-1)[source]
Triggers a reset of port protection.
Cause port protection to be reset on all the interconnects of the logical interconnect that matches ID.
- Parameters
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
The interconnect.
- Return type
dict
- update_configuration(timeout=-1)[source]
Reapplies the appliance’s configuration on the interconnect. This includes running the same configure steps that were performed as part of the interconnect add by the enclosure.
- Parameters
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
Interconnect
- update_port(port_information, timeout=-1)[source]
Updates an interconnect port.
- Parameters
port_information (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
The interconnect.
- Return type
dict
- update_ports(ports, timeout=-1)[source]
Updates the interconnect ports.
- Parameters
ports (list) – Ports 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
The interconnect.
- Return type
dict
hpeOneView.resources.networking.internal_link_sets module
- class hpeOneView.resources.networking.internal_link_sets.InternalLinkSets(connection, data=None)[source]
Bases:
Resource
Internal Link Sets API client.
Note
This resource is available for API version 300 or later.
- URI = '/rest/internal-link-sets'
- get_all(start=0, count=-1, filter='', query='', sort='', view='', fields='')[source]
Gets a paginated collection of all internal link sets. The collection is based on optional sorting and filtering and is constrained by start and count parameters.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
query – A general query string to narrow the list of resources returned. The default is no query - all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
fields – Specifies which fields should be returned in the result set.
view – Return a specific subset of the attributes of the resource or collection, by specifying the name of a predefined view. The default view is expand - show all attributes of the resource and all elements of collections of resources.
- Returns
Internal Link Set Collection.
- Return type
list
hpeOneView.resources.networking.logical_downlinks module
- class hpeOneView.resources.networking.logical_downlinks.LogicalDownlinks(con)[source]
Bases:
object
Logical Downlinks API client.
- URI = '/rest/logical-downlinks'
- get(id_or_uri)[source]
Gets a logical downlink by ID or by URI.
- Parameters
id_or_uri – Can be either the logical downlink id or the logical downlink uri.
- Returns
The logical downlink.
- Return type
dict
- get_all(start=0, count=-1, filter='', sort='')[source]
Gets a paginated collection of logical downlinks. The collection is based on optional sorting and filtering and is constrained by start and count parameters.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
- Returns
A list of logical downlinks.
- Return type
list
- get_all_without_ethernet(start=0, count=-1, filter='', sort='')[source]
Gets a paginated collection of logical downlinks without ethernet. The collection is based on optional sorting and filtering and is constrained by start and count parameters.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
- Returns
dict
hpeOneView.resources.networking.logical_interconnect_groups module
- class hpeOneView.resources.networking.logical_interconnect_groups.LogicalInterconnectGroups(connection, data=None)[source]
Bases:
ResourcePatchMixin
,Resource
Logical Interconnect Groups API client.
- DEFAULT_VALUES = {'1000': {'type': 'logical-interconnect-groupV6'}, '1200': {'type': 'logical-interconnect-groupV7'}, '1400': {'type': 'logical-interconnect-groupV8'}, '1600': {'type': 'logical-interconnect-groupV8'}, '1800': {'type': 'logical-interconnect-groupV8'}, '200': {'type': 'logical-interconnect-groupV3'}, '300': {'type': 'logical-interconnect-groupV300'}, '500': {'type': 'logical-interconnect-groupV300'}, '600': {'type': 'logical-interconnect-groupV4'}, '800': {'type': 'logical-interconnect-groupV5'}}
- URI = '/rest/logical-interconnect-groups'
- get_all(start=0, count=-1, filter='', sort='', scope_uris='')[source]
Gets a list of logical interconnect groups based on optional sorting and filtering and is constrained by start and count parameters.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
scope_uris – An expression to restrict the resources returned according to the scopes to which they are assigned.
- Returns
A list of logical interconnect groups.
- Return type
list
hpeOneView.resources.networking.logical_interconnects module
- class hpeOneView.resources.networking.logical_interconnects.LogicalInterconnects(connection, data=None)[source]
Bases:
ResourcePatchMixin
,Resource
Logical Interconnects API client.
- FIRMWARE_PATH = '/firmware'
- FORWARDING_INFORMATION_PATH = '/forwarding-information-base'
- PORT_MONITOR_PATH = '/port-monitor'
- QOS_AGGREGATED_CONFIGURATION = '/qos-aggregated-configuration'
- SETTINGS_DEFAULT_VALUES = {'200': {'type': 'InterconnectSettingsV3'}, '300': {'type': 'InterconnectSettingsV201'}, '500': {'type': 'InterconnectSettingsV201'}}
- SETTINGS_ETHERNET_DEFAULT_VALUES = {'1000': {'type': 'EthernetInterconnectSettingsV5'}, '1200': {'type': 'EthernetInterconnectSettingsV6'}, '1400': {'type': 'EthernetInterconnectSettingsV7'}, '1600': {'type': 'EthernetInterconnectSettingsV7'}, '1800': {'type': 'EthernetInterconnectSettingsV7'}, '200': {'type': 'EthernetInterconnectSettingsV3'}, '300': {'type': 'EthernetInterconnectSettingsV201'}, '500': {'type': 'EthernetInterconnectSettingsV201'}, '600': {'type': 'EthernetInterconnectSettingsV4'}, '800': {'type': 'EthernetInterconnectSettingsV4'}}
- SETTINGS_TELEMETRY_CONFIG_DEFAULT_VALUES = {'1000': {'type': 'telemetry-configuration'}, '1200': {'type': 'telemetry-configuration'}, '1400': {'type': 'telemetry-configuration'}, '1600': {'type': 'telemetry-configuration'}, '1800': {'type': 'telemetry-configuration'}, '200': {'type': 'telemetry-configuration'}, '300': {'type': 'telemetry-configuration'}, '500': {'type': 'telemetry-configuration'}, '600': {'type': 'telemetry-configuration'}, '800': {'type': 'telemetry-configuration'}}
- SNMP_CONFIGURATION_PATH = '/snmp-configuration'
- URI = '/rest/logical-interconnects'
- bulk_inconsistency_validate(**kwargs)
- create_forwarding_information_base(**kwargs)
- get_all(start=0, count=-1, sort='')[source]
Gets a list of logical interconnects based on optional sorting and filtering and is constrained by start and count parameters.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
- Returns
A list of logical interconnects.
- Return type
list
- get_by_name(name)[source]
Gets a logical interconnect by name.
- Parameters
name – Name of the logical interconnect.
- Returns
Logical Interconnect.
- Return type
dict
- get_ethernet_settings(**kwargs)
- get_firmware(**kwargs)
- get_forwarding_information_base(**kwargs)
- get_igmp_settings(**kwargs)
- get_internal_vlans(**kwargs)
- get_port_monitor(**kwargs)
- get_qos_aggregated_configuration(**kwargs)
- get_snmp_configuration(**kwargs)
- get_telemetry_configuration(**kwargs)
- get_unassigned_ports(**kwargs)
- get_unassigned_uplink_ports(**kwargs)
- install_firmware(**kwargs)
- update_compliance(**kwargs)
- update_configuration(**kwargs)
- update_ethernet_settings(**kwargs)
- update_igmp_settings(**kwargs)
- update_internal_networks(**kwargs)
- update_port_flap_settings(**kwargs)
- update_port_monitor(**kwargs)
- update_qos_aggregated_configuration(**kwargs)
- update_settings(**kwargs)
- update_snmp_configuration(**kwargs)
- update_telemetry_configurations(**kwargs)
hpeOneView.resources.networking.logical_switch_groups module
- class hpeOneView.resources.networking.logical_switch_groups.LogicalSwitchGroups(connection, data=None)[source]
Bases:
ResourcePatchMixin
,Resource
Logical Switch Groups API client.
Note
This resource is only available on C7000 enclosures.
- DEFAULT_VALUES = {'1000': {'type': 'logical-switch-groupV4'}, '1200': {'type': 'logical-switch-groupV4'}, '200': {'type': 'logical-switch-group'}, '300': {'type': 'logical-switch-groupV300'}, '500': {'type': 'logical-switch-groupV300'}, '600': {'type': 'logical-switch-groupV4'}, '800': {'type': 'logical-switch-groupV4'}}
- URI = '/rest/logical-switch-groups'
hpeOneView.resources.networking.logical_switches module
- class hpeOneView.resources.networking.logical_switches.LogicalSwitches(con)[source]
Bases:
object
Logical Switches API client.
Note
This resource is only available on C7000 enclosures.
- SWITCH_DEFAULT_VALUES = {'200': {'type': 'logical-switch'}, '300': {'type': 'logical-switchV300'}, '500': {'type': 'logical-switchV300'}, '600': {'type': 'logical-switchV4'}}
- URI = '/rest/logical-switches'
- create(resource, timeout=-1)[source]
Creates a Logical Switch.
- Parameters
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 its completion.
- Returns
Created resource.
- Return type
dict
- delete(resource, force=False, timeout=-1)[source]
Deletes a Logical Switch.
- Parameters
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 – 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
Indicates if the resource was successfully deleted.
- Return type
bool
- get(id_or_uri)[source]
Gets the Logical Switch with the specified ID.
- Parameters
id_or_uri – Can be either the Logical Switch ID or URI
- Returns
Logical Switch.
- Return type
dict
- get_all(start=0, count=-1, filter='', sort='')[source]
Gets a paginated collection of Logical Switches. The collection is based on optional sorting and filtering and is constrained by start and count parameters.
- Parameters
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 all items.
The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
- Returns
A list of Logical Switches.
- Return type
list
- get_by(field, value)[source]
Gets all Logical Switches that match the filter.
The search is case-insensitive.
- Parameters
field – Field name to filter.
value – Value to filter.
- Returns
A list of Logical Switches.
- Return type
list
- patch(id_or_uri, operation, path, value, timeout=-1)[source]
Uses the PATCH to update a resource for a given logical switch group.
Only one operation can be performed in each PATCH call.
- Parameters
id_or_uri – Can be either the resource ID or the resource URI.
operation – Patch operation
path – Path
value – Value
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
Updated resource.
- Return type
dict
- refresh(id_or_uri, timeout=-1)[source]
The Refresh action reclaims the top-of-rack switches in a logical switch.
- Parameters
id_or_uri – Can be either the Logical Switch ID or URI
timeout – Timeout in seconds. Wait for task completion by default. The timeout does not abort the operation in OneView, just stop waiting for its completion.
- Returns
The Logical Switch
- Return type
dict
- update(resource, timeout=-1)[source]
Updates a Logical Switch.
- Parameters
resource (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 waiting for its completion.
- Returns
Updated resource.
- Return type
dict
hpeOneView.resources.networking.network_sets module
- class hpeOneView.resources.networking.network_sets.NetworkSets(connection, data=None)[source]
Bases:
Resource
,ResourcePatchMixin
Network Sets API client.
- DEFAULT_VALUES = {'1000': {'type': 'network-setV4'}, '1200': {'type': 'network-setV5'}, '1600': {'type': 'network-setV5'}, '1800': {'type': 'network-setV5'}, '200': {'type': 'network-set'}, '300': {'type': 'network-setV300'}, '500': {'type': 'network-setV300'}, '600': {'type': 'network-setV4'}, '800': {'type': 'network-setV4'}}
- URI = '/rest/network-sets'
- get_all_without_ethernet(start=0, count=-1, filter='', sort='')[source]
Gets a paginated collection of network sets without ethernet. The collection is based on optional sorting and filtering and is constrained by start and count parameters.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
- Returns
List of network sets, excluding Ethernet networks.
- Return type
list
hpeOneView.resources.networking.sas_interconnect_types module
hpeOneView.resources.networking.sas_interconnects module
- class hpeOneView.resources.networking.sas_interconnects.SasInterconnects(connection, data=None)[source]
Bases:
ResourcePatchMixin
,Resource
SAS Interconnects API client.
Note
This resource is only available on HPE Synergy.
- URI = '/rest/sas-interconnects'
- get_all(start=0, count=-1, fields='', filter='', query='', sort='', view='')[source]
Get list of SAS interconnects each with port details.
- Parameters
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 all items. The actual number of items in the response may differ from the requested count if the sum of start and count exceeds the total number of items.
fields – Specifies which fields should be returned in the result set.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
query – A general query string to narrow the list of resources returned. The default is no query (all resources are returned).
sort – The sort order of the returned data set. By default, the sort order is based on create time, with the oldest entry first.
view – Returns a specific subset of the attributes of the resource or collection, by specifying the name of a predefined view. The default view is expand (show all attributes of the resource and all elements of collections of resources).
- Returns
A list of SAS interconnects.
- Return type
list
hpeOneView.resources.networking.sas_logical_interconnect_groups module
- class hpeOneView.resources.networking.sas_logical_interconnect_groups.SasLogicalInterconnectGroups(connection, data=None)[source]
Bases:
Resource
SAS Logical Interconnect Groups API client.
Note
This resource is only available on HPE Synergy.
- DEFAULT_VALUES = {'1000': {'type': 'sas-logical-interconnect-groupV2'}, '1200': {'type': 'sas-logical-interconnect-groupV2'}, '300': {'type': 'sas-logical-interconnect-group'}, '500': {'type': 'sas-logical-interconnect-group'}, '600': {'type': 'sas-logical-interconnect-groupV2'}, '800': {'type': 'sas-logical-interconnect-groupV2'}}
- URI = '/rest/sas-logical-interconnect-groups'
- get_all(start=0, count=-1, filter='', sort='', scope_uris='', query='')[source]
Gets a paginated collection of SAS logical interconnect groups. The collection is based on optional sorting and filtering and is constrained by start and count parameters.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
scope_uris – An expression to restrict the resources returned according to the scopes to which they are assigned.
query (str) – A general query string to narrow the list of resources returned. The default is no query - all resources are returned.
- Returns
A list of SAS logical interconnect groups.
- Return type
list
hpeOneView.resources.networking.sas_logical_interconnects module
- class hpeOneView.resources.networking.sas_logical_interconnects.SasLogicalInterconnects(connection, data=None)[source]
Bases:
Resource
SAS Logical Interconnects API client.
- URI = '/rest/sas-logical-interconnects'
- get_all(start=0, count=-1, fields='', filter='', query='', sort='', view='')[source]
Gets a list of SAS Logical Interconnects based on optional sorting and filtering and constrained by start and count parameters.
- Parameters
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 all items. The actual number of items in the response may differ from the requested count if the sum of start and count exceeds the total number of items.
fields – Specifies which fields should be returned in the result set.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
query – A general query string to narrow the list of resources returned. The default is no query (all resources are returned).
sort – The sort order of the returned data set. By default, the sort order is based on create time, with the oldest entry first.
view – Returns a specific subset of the attributes of the resource or collection, by specifying the name of a predefined view. The default view is expand (show all attributes of the resource and all elements of collections of resources).
- Returns
A list of SAS logical interconnects.
- Return type
list
- get_firmware(**kwargs)
- replace_drive_enclosure(**kwargs)
- update_compliance(**kwargs)
- update_compliance_all(information, timeout=-1)[source]
Returns SAS Logical Interconnects to a consistent state. The current SAS Logical Interconnect state is compared to the associated SAS Logical Interconnect group.
- Parameters
information – Can be either the resource ID or URI.
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
SAS Logical Interconnect.
- Return type
dict
- update_configuration(**kwargs)
- update_firmware(**kwargs)
hpeOneView.resources.networking.switch_types module
hpeOneView.resources.networking.switches module
- class hpeOneView.resources.networking.switches.Switches(con)[source]
Bases:
object
Switches API client.
Note
This resource is only available on C7000 enclosures.
- URI = '/rest/switches'
- delete(resource, force=False, timeout=-1)[source]
Deletes a migrated switch.
- Parameters
resource (dict) – Object to delete.
force (bool) – If set to true, the operation completes despite any problems with network connectivity or errors on the resource itself. The default is false.
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
Indicates if the resource was successfully deleted.
- Return type
bool
- get(id_or_uri)[source]
Gets a switch by ID or by URI.
- Parameters
id_or_uri – Can be either the switch ID or URI.
- Returns
Switch
- Return type
dict
- get_all(start=0, count=-1, filter='', sort='')[source]
Gets a list of top of rack switches.
- Parameters
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 all items. The actual number of items in the response might differ from the requested count if the sum of start and count exceeds the total number of items.
filter (list or str) – A general filter/query string to narrow the list of items returned. The default is no filter; all resources are returned.
sort – The sort order of the returned data set. By default, the sort order is based on create time with the oldest entry first.
- Returns
A list of rack switches.
- Return type
list
- get_by(field, value)[source]
Gets all switches that match the filter.
The search is case-insensitive.
- Parameters
field – field name to filter
value – value to filter
- Returns
A list of rack switches.
- Return type
list
- get_environmental_configuration(id_or_uri)[source]
Gets the environmental configuration for a switch.
- Parameters
id_or_uri – Can be either the resource ID or URI.
- Returns
environmental configuration
- Return type
dict
- get_statistics(id_or_uri, port_name='')[source]
Gets statistics for a switch.
- Parameters
id_or_uri – Can be either the switch id or the switch uri.
port_name – switch port number (optional)
- Returns
dict
- patch(id_or_uri, operation, path, value, timeout=-1)[source]
Uses the PATCH to update a resource for a given logical switch.
Only one operation can be performed in each PATCH call.
- Parameters
id_or_uri – Can be either the resource ID or the resource URI.
operation – Patch operation
path – Path
value – Value
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
Updated resource.
- Return type
dict
- update_ports(ports, id_or_uri)[source]
Updates the switch ports. Only the ports under the management of OneView and those that are unlinked are supported for update.
Note
This method is available for API version 300 or later.
- Parameters
ports – List of Switch Ports.
id_or_uri – Can be either the switch id or the switch uri.
- Returns
Switch
- Return type
dict
hpeOneView.resources.networking.uplink_sets module
- class hpeOneView.resources.networking.uplink_sets.UplinkSets(connection, data=None)[source]
Bases:
Resource
Uplink Sets API client.
- DEFAULT_VALUES = {'1000': {'type': 'uplink-setV5'}, '1200': {'type': 'uplink-setV6'}, '1600': {'type': 'uplink-setV7'}, '1800': {'type': 'uplink-setV7'}, '200': {'type': 'uplink-setV3'}, '300': {'type': 'uplink-setV300'}, '500': {'type': 'uplink-setV300'}, '600': {'type': 'uplink-setV4'}, '800': {'type': 'uplink-setV4'}}
- URI = '/rest/uplink-sets'
- add_ethernet_networks(**kwargs)
- get_ethernet_networks(**kwargs)
- remove_ethernet_networks(**kwargs)