Module netapp_ontap.resources.storage_bridge
Copyright © 2023 NetApp Inc. All rights reserved.
This file has been automatically generated based on the ONTAP REST API documentation.
Retrieving storage bridge information
The storage bridge GET API retrieves all of the bridges in the cluster.
Examples
1) Retrieves a list of bridges from the cluster
The following example shows the response with a list of bridges from the cluster:
from netapp_ontap import HostConnection
from netapp_ontap.resources import StorageBridge
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
print(list(StorageBridge.get_collection()))
[
StorageBridge({"name": "ATTO_2000001086a18100", "wwn": "2000001086a18100"}),
StorageBridge({"name": "ATTO_2000001086a18380", "wwn": "2000001086a18380"}),
]
2) Retrieves a specific bridge from the cluster
The following example shows the response of the requested bridge. If there is no bridge with the requested wwn, an error is returned.
from netapp_ontap import HostConnection
from netapp_ontap.resources import StorageBridge
with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
resource = StorageBridge(wwn="2000001086a18100")
resource.get()
print(resource)
StorageBridge(
{
"dram_single_bit_error_count": 0,
"serial_number": "FB7500N102450",
"power_supply_units": [
{"name": "A", "state": "ok"},
{"name": "B", "state": "ok"},
],
"name": "ATTO_2000001086a18100",
"state": "ok",
"fc_ports": [
{
"peer_wwn": "0000000000000000",
"sfp": {
"data_rate_capability": 16.0,
"part_number": "FTLF8529P3BCV",
"serial_number": "UW106SA",
"vendor": "FINISAR CORP.",
},
"configured_data_rate": 8.0,
"id": 1,
"wwn": "2100001086a18100",
"data_rate_capability": 16.0,
"state": "online",
"negotiated_data_rate": 8.0,
"enabled": True,
},
{
"peer_wwn": "0000000000000000",
"sfp": {
"data_rate_capability": 16.0,
"part_number": "FTLF8529P3BCV",
"serial_number": "UW1072B",
"vendor": "FINISAR CORP.",
},
"configured_data_rate": 16.0,
"id": 2,
"wwn": "2200001086a18100",
"data_rate_capability": 16.0,
"state": "online",
"negotiated_data_rate": 16.0,
"enabled": True,
},
],
"security_enabled": False,
"last_reboot": {
"time": "2020-12-09T00:47:58-05:00",
"reason": {
"code": "39321683",
"message": 'Reason: "FirmwareRestart Command".',
},
},
"firmware_version": "3.10 007A",
"vendor": "atto",
"monitoring_enabled": True,
"sas_ports": [
{
"phy_2": {"state": "online"},
"cable": {
"technology": "Passive Copper 5m ID:00",
"part_number": "112-00431",
"serial_number": "618130935",
"vendor": "Molex Inc.",
},
"phy_1": {"state": "online"},
"id": 1,
"wwn": "5001086000a18100",
"data_rate_capability": 12.0,
"phy_4": {"state": "online"},
"phy_3": {"state": "online"},
"state": "online",
"negotiated_data_rate": 6.0,
"enabled": True,
},
{
"phy_2": {"state": "offline"},
"phy_1": {"state": "offline"},
"wwn": "5001086000a18104",
"data_rate_capability": 12.0,
"phy_4": {"state": "offline"},
"phy_3": {"state": "offline"},
"state": "offline",
"negotiated_data_rate": 0.0,
"enabled": False,
},
{
"phy_2": {"state": "offline"},
"phy_1": {"state": "offline"},
"wwn": "5001086000a18108",
"data_rate_capability": 12.0,
"phy_4": {"state": "offline"},
"phy_3": {"state": "offline"},
"state": "offline",
"negotiated_data_rate": 0.0,
"enabled": False,
},
{
"phy_2": {"state": "offline"},
"phy_1": {"state": "offline"},
"wwn": "5001086000a1810c",
"data_rate_capability": 12.0,
"phy_4": {"state": "offline"},
"phy_3": {"state": "offline"},
"state": "offline",
"negotiated_data_rate": 0.0,
"enabled": False,
},
],
"managed_by": "in_band",
"chassis_throughput_state": "ok",
"ip_address": "10.226.57.178",
"model": "FibreBridge 7500N",
"symbolic_name": "RTP-FCSAS02-41KK10",
"temperature_sensor": {
"minimum": 0,
"name": "Chassis Temperature Sensor",
"state": "ok",
"maximum": 90,
"reading": 54,
},
"paths": [
{
"name": "0e",
"node": {
"name": "sti8080mcc-htp-005",
"_links": {
"self": {
"href": "/api/cluster/nodes/ecc3d992-3a86-11eb-9fab-00a0985a6024"
}
},
"uuid": "ecc3d992-3a86-11eb-9fab-00a0985a6024",
},
"target_port": {"wwn": "2100001086a18380"},
}
],
"wwn": "2000001086a18100",
}
)
Classes
class StorageBridge (*args, **kwargs)
-
Allows interaction with StorageBridge objects on the host
Initialize the instance of the resource.
Any keyword arguments are set on the instance as properties. For example, if the class was named 'MyResource', then this statement would be true:
MyResource(name='foo').name == 'foo'
Args
*args
- Each positional argument represents a parent key as used in the URL of the object. That is, each value will be used to fill in a segment of the URL which refers to some parent object. The order of these arguments must match the order they are specified in the URL, from left to right.
**kwargs
- each entry will have its key set as an attribute name on the instance and its value will be the value of that attribute.
Ancestors
Static methods
def count_collection (*args, connection: HostConnection = None, **kwargs) -> int
-
Returns a count of all StorageBridge resources that match the provided query
This calls GET on the object to determine the number of records. It is more efficient than calling get_collection() because it will not construct any objects. Query parameters can be passed in as kwargs to determine a count of objects that match some filtered criteria.
Args
*args
- Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to get the count of bars for a particular foo, the foo.name value should be passed.
connection
- The
HostConnection
object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context. **kwargs
- Any key/value pairs passed will be sent as query parameters to the host. These query parameters can affect the count. A return_records query param will be ignored.
Returns
On success, returns an integer count of the objects of this type. On failure, returns -1.
Raises
NetAppRestError
: If the API call returned a status code >= 400, or if there is no connection available to use either passed in or on the library. def find (*args, connection: HostConnection = None, **kwargs) -> Resource
-
Retrieves a collection of bridges.
Related ONTAP commands
storage bridge show
Learn more
Find an instance of an object on the host given a query.
The host will be queried with the provided key/value pairs to find a matching resource. If 0 are found, None will be returned. If more than 1 is found, an error will be raised or returned. If there is exactly 1 matching record, then it will be returned.
Args
*args
- Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to find a bar for a particular foo, the foo.name value should be passed.
connection
- The
HostConnection
object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context. **kwargs
- Any key/value pairs passed will be sent as query parameters to the host.
Returns
A
Resource
object containing the details of the object or None if no matches were found.Raises
NetAppRestError
: If the API call returned more than 1 matching resource. def get_collection (*args, connection: HostConnection = None, max_records: int = None, **kwargs) -> Iterable[Resource]
-
Retrieves a collection of bridges.
Related ONTAP commands
storage bridge show
Learn more
Fetch a list of all objects of this type from the host.
This is a lazy fetch, making API calls only as necessary when the result of this call is iterated over. For instance, if max_records is set to 5, then iterating over the collection causes an API call to be sent to the server once for every 5 records. If the client stops iterating before getting to the 6th record, then no additional API calls are made.
Args
*args
- Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to get the collection of bars for a particular foo, the foo.name value should be passed.
connection
- The
HostConnection
object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context. max_records
- The maximum number of records to return per call
**kwargs
- Any key/value pairs passed will be sent as query parameters to the host.
Returns
A list of
Resource
objectsRaises
NetAppRestError
: If there is no connection available to use either passed in or on the library. This would be not be raised when get_collection() is called, but rather when the result is iterated.
Methods
def get (self, **kwargs) -> NetAppResponse
-
Retrieves a specific bridge
Related ONTAP commands
storage bridge show
Learn more
Fetch the details of the object from the host.
Requires the keys to be set (if any). After returning, new or changed properties from the host will be set on the instance.
Returns
A
NetAppResponse
object containing the details of the HTTP response.Raises
NetAppRestError
: If the API call returned a status code >= 400
Inherited members
class StorageBridgeSchema (*, only: Union[Sequence[str], Set[str]] = None, exclude: Union[Sequence[str], Set[str]] = (), many: bool = False, context: Dict = None, load_only: Union[Sequence[str], Set[str]] = (), dump_only: Union[Sequence[str], Set[str]] = (), partial: Union[bool, Sequence[str], Set[str]] = False, unknown: str = None)
-
The fields of the StorageBridge object
Ancestors
- netapp_ontap.resource.ResourceSchema
- marshmallow.schema.Schema
- marshmallow.base.SchemaABC
Class variables
-
chassis_throughput_state: str GET
-
Chassis throughput status
Valid choices:
- ok
- warning
-
dram_single_bit_error_count: Size GET
-
The dram_single_bit_error_count field of the storage_bridge.
-
errors: List[StorageBridgeErrors] GET
-
The errors field of the storage_bridge.
-
fc_ports: List[StorageBridgeFcPorts] GET
-
The fc_ports field of the storage_bridge.
-
firmware_version: str GET
-
Bridge firmware version
Example: 4.10 007A
-
ip_address: str GET
-
IP Address
-
last_reboot: StorageBridgeLastReboot GET
-
The last_reboot field of the storage_bridge.
-
managed_by: str GET
-
The managed_by field of the storage_bridge.
Valid choices:
- snmp
- in_band
-
model: str GET
-
Bridge model
Example: FibreBridge6500N
-
monitoring_enabled: bool GET
-
Indicates whether monitoring is enabled for the bridge.
-
name: str GET
-
Bridge name
Example: ATTO_FibreBridge6500N_1
-
paths: List[StorageBridgePaths] GET
-
The paths field of the storage_bridge.
-
power_supply_units: List[StorageBridgePowerSupplyUnits] GET
-
The power_supply_units field of the storage_bridge.
-
sas_ports: List[StorageBridgeSasPorts] GET
-
The sas_ports field of the storage_bridge.
-
security_enabled: bool GET
-
Indicates whether security is enabled for the bridge.
-
serial_number: str GET
-
Bridge serial number
Example: FB7600N100004
-
state: str GET
-
Bridge state
Valid choices:
- unknown
- ok
- error
-
symbolic_name: str GET
-
Bridge symbolic name
Example: rtp-fcsas03-41kk11
-
temperature_sensor: StorageBridgeTemperatureSensor GET
-
The temperature_sensor field of the storage_bridge.
-
vendor: str GET
-
Bridge vendor
Valid choices:
- unknown
- atto
-
wwn: str GET
-
Bridge world wide name
Example: 2000001086600476