netapp_ontap.resources.fc_port API documentation
Description: Copyright &copy; 2026 NetApp Inc. All rights reserved …

# Module `netapp_ontap.resources.fc_port`

Copyright © 2026 NetApp Inc. All rights reserved.

This file has been automatically generated based on the ONTAP REST API documentation.

## Overview

Fibre Channel (FC) ports are the physical ports of FC adapters on ONTAP cluster nodes that can be connected to FC networks to provide FC network connectivity. An FC port defines the location of an FC interface within the ONTAP cluster.
The Fibre Channel port REST API allows you to discover FC ports, obtain status information for FC ports, and configure FC port properties. POST and DELETE requests are not supported. You must physically add and remove FC adapters to ONTAP nodes to create and remove ports from the ONTAP cluster.

## Performance monitoring

Performance of an FC port can be monitored by observing the `metric.*` and `statistics.*` properties. These properties show the performance of an FC port in terms of IOPS, latency, and throughput. The `metric.*` properties denote an average, whereas `statistics.*` properties denote a real-time monotonically increasing value aggregated across all nodes.

## Examples

### Retrieving all FC ports

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcPort

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(list(FcPort.get_collection()))

Try it out

    [
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b20f8-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "0a",
                "uuid": "931b20f8-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b23f7-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "0b",
                "uuid": "931b23f7-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b25ba-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "0c",
                "uuid": "931b25ba-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b2748-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "0d",
                "uuid": "931b2748-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b28c2-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "0e",
                "uuid": "931b28c2-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b2a7b-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "0f",
                "uuid": "931b2a7b-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b2e2b-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "1b",
                "uuid": "931b2e2b-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
    ]

### Retrieving all FC ports with state online

The `state` query parameter is used to perform the query.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcPort

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(list(FcPort.get_collection(state="online")))

Try it out

    [
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b20f8-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "0a",
                "state": "online",
                "uuid": "931b20f8-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b23f7-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "0b",
                "state": "online",
                "uuid": "931b23f7-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
        FcPort(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/ports/931b25ba-b047-11e8-9af3-005056bb838e"
                    }
                },
                "name": "0c",
                "state": "online",
                "uuid": "931b25ba-b047-11e8-9af3-005056bb838e",
                "node": {
                    "name": "node1",
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/3c768e01-1abc-4b3b-b7c0-629ceb62a497"
                        }
                    },
                    "uuid": "3c768e01-1abc-4b3b-b7c0-629ceb62a497",
                },
            }
        ),
    ]

### Retrieving an FC port

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcPort

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = FcPort(uuid="931b20f8-b047-11e8-9af3-005056bb838e")
        resource.get()
        print(resource)

Try it out

    FcPort(
        {
            "speed": {"configured": "auto", "maximum": "8"},
            "_links": {
                "self": {
                    "href": "/api/network/fc/ports/931b20f8-b047-11e8-9af3-005056bb838e"
                }
            },
            "wwpn": "50:0a:09:82:bb:83:8e:00",
            "metric": {
                "latency": {"write": 0, "total": 0, "other": 0, "read": 0},
                "timestamp": "2019-04-09T05:50:15+00:00",
                "iops": {"write": 0, "total": 0, "other": 0, "read": 0},
                "status": "ok",
                "duration": "PT15S",
                "throughput": {"write": 0, "total": 0, "read": 0},
            },
            "transceiver": {
                "part_number": "1000",
                "form_factor": "SFP",
                "capabilities": [4, 8],
                "manufacturer": "ACME",
            },
            "name": "0a",
            "state": "online",
            "statistics": {
                "throughput_raw": {"write": 0, "total": 0, "read": 0},
                "iops_raw": {"write": 0, "total": 3, "other": 3, "read": 0},
                "timestamp": "2019-04-09T05:50:42+00:00",
                "status": "ok",
                "latency_raw": {"write": 0, "total": 38298, "other": 38298, "read": 0},
            },
            "uuid": "931b20f8-b047-11e8-9af3-005056bb838e",
            "wwnn": "50:0a:09:80:bb:83:8e:00",
            "description": "Fibre Channel Target Adapter 0a (ACME Fibre Channel Adapter, rev. 1.0.0, 8G)",
            "fabric": {
                "port_address": "52100",
                "connected": True,
                "name": "55:0e:b1:a0:20:40:80:00",
                "switch_port": "ssan-g620-03:1",
                "connected_speed": 8,
            },
            "node": {
                "name": "node1",
                "_links": {
                    "self": {
                        "href": "/api/cluster/nodes/5a534a72-b047-11e8-9af3-005056bb838e"
                    }
                },
                "uuid": "5a534a72-b047-11e8-9af3-005056bb838e",
            },
            "supported_protocols": ["fcp"],
            "physical_protocol": "fibre_channel",
            "enabled": True,
        }
    )

### Disabling an FC port

If an active FC interface exists on an FC port, the port cannot be disabled.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcPort

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = FcPort(uuid="931b20f8-b047-11e8-9af3-005056bb838e")
        resource.enabled = False
        resource.patch()

## Classes

`class FcPort (*args, **kwargs)`

  A Fibre Channel (FC) port is the physical port of an FC adapter on an ONTAP cluster node that can be connected to an FC network to provide FC network connectivity. An FC port defines the location of an FC interface within the ONTAP cluster.

  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

  - Resource

  ### Static methods

  `def count_collection (*args, connection: HostConnection = None, **kwargs) -> int`

    Returns a count of all FcPort 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 fast_get_collection (*args, connection: HostConnection = None, max_records: int = None, **kwargs) -> Iterable[RawResource]`

    Returns a list of RawResources that represent FcPort resources that match the provided query

    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
    `raw`
      return a list of `netapp_ontap.resource.RawResource` objects that require to be promoted before any RESTful operations can be used on them. Setting this argument to True makes get_collection substantially quicker when many records are returned from the server.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

    A list of `Resource` objects

    ## Raises

    `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.

  `def find (*args, connection: HostConnection = None, **kwargs) -> Resource`

    Retrieves FC ports.

    ### Expensive properties

    There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See `Requesting specific fields` to learn more. * `fabric.name` * `statistics.*` * `metric.*`

    ### Related ONTAP commands

    - `network fcp adapter show`

    ### Learn more

    - `DOC /network/fc/ports`

    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 FC ports.

    ### Expensive properties

    There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See `Requesting specific fields` to learn more. * `fabric.name` * `statistics.*` * `metric.*`

    ### Related ONTAP commands

    - `network fcp adapter show`

    ### Learn more

    - `DOC /network/fc/ports`

    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
    `raw`
      return a list of `netapp_ontap.resource.RawResource` objects that require to be promoted before any RESTful operations can be used on them. Setting this argument to True makes get_collection substantially quicker when many records are returned from the server.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

    A list of `Resource` objects

    ## Raises

    `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.

  `def patch_collection (body: dict, *args, records: Iterable[ForwardRef('FcPort')] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Updates an FC port.

    ### Related ONTAP commands

    - `network fcp adapter modify`

    ### Learn more

    - `DOC /network/fc/ports`

    Patch all objects in a collection which match the given query.

    All records on the host which match the query will be patched with the provided body.

    ## Args

    `body`
      A dictionary of name/value pairs to set on all matching members of the collection. The body argument will be ignored if records is provided.
    `*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 patch the collection of bars for a particular foo, the foo.name value should be passed.
    `records`
      Can be provided in place of a query. If so, this list of objects will be patched on the host.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `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. Only resources matching this query will be patched.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  ### Methods

  `def get (self, **kwargs) -> NetAppResponse`

    Retrieves an FC port.

    ### Expensive properties

    There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See `Requesting specific fields` to learn more. * `fabric.name` * `statistics.*` * `metric.*`

    ### Related ONTAP commands

    - `network fcp adapter show`

    ### Learn more

    - `DOC /network/fc/ports`

    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 or if not all of the keys required are present and config.STRICT_GET has been set to True.

  `def patch (self, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse`

    Updates an FC port.

    ### Related ONTAP commands

    - `network fcp adapter modify`

    ### Learn more

    - `DOC /network/fc/ports`

    Send the difference in the object's state to the host as a modification request.

    Calculates the difference in the object's state since the last time we interacted with the host and sends this in the request body.

    ## Args

    `hydrate`
      If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of the object.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `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 normally be sent as query parameters to the host. If any of these pairs are parameters that are sent as formdata then only parameters of that type will be accepted and all others will be discarded.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  ### Inherited members

  - `Resource`:
    - `from_dict`
    - `get_collection_url`
    - `get_connection`
    - `instance_location`
    - `path_keys`
    - `poll`
    - `set_connection`
    - `to_dict`
    - `validate_schema`
`class FcPortSchema (*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool | None = None, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet | None = None, unknown: str | None = None)`

  The fields of the FcPort object

  ### Ancestors

  - netapp_ontap.resource.ResourceSchema
  - marshmallow.schema.Schema
  - marshmallow.base.SchemaABC
  - abc.ABC

  ### Class variables

  `description: str GET`

    A description of the FC port.

    Example: Fibre Channel Target Adapter 0a (ACME Fibre Channel Adapter, rev. 1.0.0, 8G)

  `enabled: bool GET POST PATCH`

    The administrative state of the FC port. If this property is set to false, all FC connectivity to FC interfaces are blocked. Optional in PATCH.

  `fabric: FcPortFabric GET`

    Properties of the fabric to which the FC port is attached.

  `interface_count: Size GET`

    The number of FC interfaces currently provisioned on this port. This property is not supported in an SVM context.

  `links: SelfLink GET`

    The links field of the fc_port.

  `metric: PerformanceMetricReducedThroughput GET`

    Performance numbers, such as IOPS latency and throughput

  `name: str GET`

    The FC port name.

    Example: 0a

  `node: Node GET`

    The node field of the fc_port.

  `physical_protocol: str GET`

    The physical network protocol of the FC port.

    Valid choices:

    - fibre_channel
    - ethernet
  `speed: FcPortSpeed GET`

    The physical device speed related properties of the FC port.

  `state: str GET`

    The operational state of the FC port. - startup - The port is booting up. - link_not_connected - The port has finished initialization, but a link with the fabric is not established. - online - The port is initialized and a link with the fabric has been established. - link_disconnected - The link was present at one point on this port but is currently not established. - offlined_by_user - The port is administratively disabled. - offlined_by_system - The port is set to offline by the system. This happens when the port encounters too many errors. - node_offline - The state information for the port cannot be retrieved. The node is offline or inaccessible.

    Valid choices:

    - startup
    - link_not_connected
    - online
    - link_disconnected
    - offlined_by_user
    - offlined_by_system
    - node_offline
    - unknown
  `statistics: PerformanceMetricRawReducedThroughput GET`

    These are raw performance numbers, such as IOPS latency and throughput. These numbers are aggregated across all nodes in the cluster and increase with the uptime of the cluster.

  `supported_protocols: List[str] GET`

    The network protocols supported by the FC port.

  `transceiver: FcPortTransceiver GET`

    Properties of the transceiver connected to the FC port.

  `uuid: str GET`

    The unique identifier of the FC port.

    Example: 1cd8a442-86d1-11e0-ae1c-123478563412

  `wwnn: str GET`

    The base world wide node name (WWNN) for the FC port.

    Example: 20:00:00:50:56:b4:13:a8

  `wwpn: str GET`

    The base world wide port name (WWPN) for the FC port.

    Example: 20:00:00:50:56:b4:13:a8