# Module `netapp_ontap.resources.fc_interface`

Copyright © 2023 NetApp Inc. All rights reserved.

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

## Overview

Fibre Channel (FC) interfaces are the logical endpoints for FC network connections to an SVM. An FC interface provides FC access to storage within the interface SVM using either Fibre Channel Protocol (FCP) or NVMe over FC (NVMe/FC).
The FC interface REST API allows you to create, delete, update, and discover FC interfaces, and obtain status information for FC interfaces.
An FC interface is created on an FC port which is located on a cluster node. The FC port must be specified to identify the location of the interface for a POST or PATCH request that relocates an interface. You can identify the port by supplying either the node and port names or the port UUID.

## Performance monitoring

Performance of an FC interface can be monitored by observing the `metric.*` and `statistics.*` properties. These properties show the performance of an FC interface 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.

## Interface placement recommendations

The FC interface REST API can also recommend the placement (cluster nodes and FC ports) for FC interfaces for a new or existing SVM as well as evaluate caller-proposed locations for FC interfaces. This functionality is available to cluster administators only and is accessed using `GET /network/fc/interfaces` with the `recommend` family of query parameters.
The query parameter `recommend.data_protocol` is required when getting recommendations or evaluating caller-proposed locations for FC interfaces. It identifies the type of FC interfaces to recommend. Other `recommend` query parameters are optional and are used to modify the recommendation algorithm.
If an SVM is supplied using the query parameter `recommend.svm.name` and/or `recommend.svm.uuid`, existing FC interfaces are considered as part of the overall solution and only additionally recommended interfaces are returned. If no SVM is supplied, recommendations are returned for a new SVM.
FC fabrics connected to the cluster are discovered by the API. By default, FC interfaces are placed and evaluated for each fabric. The query parameter `recommend.fabrics.name` can be used to identify specific FC fabrics to use.
Cluster nodes supporting FC fabric connections for the specific data protocol are discovered by the API. By default, FC interfaces are placed all supported cluster nodes. Either query parameter `recommend.nodes.name` or `recommend.nodes.uuid` can be used to identify specific cluster nodes to use.
FC interfaces for the FC-NVMe data protocol are limited to two (2) interfaces per cluster node with a maximum of four (4) nodes, within a single SVM.
Placement recommendations are best effort and limited by the information available. In situations where an optimum configuration cannot be produced, the API returns the recommendations it can along with messages describing how the caller might improve the configuration. These messages are produced by evaluating the calculated FC interface layout against best practices.
The same best practice evaluation can be applied to a caller-proposed configuration by using the query parameter `recommend.proposed.locations.port.uuid` to specify the locations for proposed FC interfaces. When this query parameter is supplied, the best practice evaluation is performed using the proposed interface locations and messages are produced describing how the caller might improve the configuration.

## Examples

### Creating an FC interface using the port node and name to identify the location

This example uses the `return_records` query parameter to retrieve the newly created FC interface in the POST response.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = FcInterface()
        resource.svm = {"name": "svm1"}
        resource.name = "lif1"
        resource.location = {"home_port": {"name": "0a", "home_node": {"name": "node1"}}}
        resource.data_protocol = "fcp"
        resource.post(hydrate=True)
        print(resource)

Try it out

    FcInterface(
        {
            "_links": {
                "self": {
                    "href": "/api/network/fc/interfaces/f6045b92-dec7-11e8-a733-005056bba0e0"
                }
            },
            "name": "lif1",
            "data_protocol": "fcp",
            "port_address": "9da2cb1",
            "svm": {
                "_links": {
                    "self": {"href": "/api/svm/svms/cf300f5c-db83-11e8-bd46-005056bba0e0"}
                },
                "name": "svm1",
                "uuid": "cf300f5c-db83-11e8-bd46-005056bba0e0",
            },
            "wwpn": "20:04:00:50:56:bb:a0:e0",
            "wwnn": "20:00:00:50:56:bb:a0:e0",
            "enabled": True,
            "state": "down",
            "uuid": "f6045b92-dec7-11e8-a733-005056bba0e0",
            "location": {
                "home_node": {
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/bafe9b9f-db81-11e8-bd46-005056bba0e0"
                        }
                    },
                    "name": "node1",
                    "uuid": "bafe9b9f-db81-11e8-bd46-005056bba0e0",
                },
                "node": {
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/bafe9b9f-db81-11e8-bd46-005056bba0e0"
                        }
                    },
                    "name": "node1",
                    "uuid": "bafe9b9f-db81-11e8-bd46-005056bba0e0",
                },
                "port": {
                    "_links": {
                        "self": {
                            "href": "/api/network/fc/ports/300c1ae3-db82-11e8-bd46-005056bba0e0"
                        }
                    },
                    "name": "0a",
                    "node": {"name": "node1"},
                    "uuid": "300c1ae3-db82-11e8-bd46-005056bba0e0",
                },
                "home_port": {
                    "_links": {
                        "self": {
                            "href": "/api/network/fc/ports/300c1ae3-db82-11e8-bd46-005056bba0e0"
                        }
                    },
                    "name": "0a",
                    "node": {"name": "node1"},
                    "uuid": "300c1ae3-db82-11e8-bd46-005056bba0e0",
                },
            },
        }
    )

### Creating an FC interface using the port UUID to identify the location

This example uses the `return_records` query parameter to retrieve the newly created FC interface in the POST response.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = FcInterface()
        resource.svm = {"name": "svm3"}
        resource.name = "lif2"
        resource.location = {"home_port": {"uuid": "24bb636a-db83-11e8-9a49-005056bb1ec6"}}
        resource.data_protocol = "fc_nvme"
        resource.post(hydrate=True)
        print(resource)

Try it out

    FcInterface(
        {
            "_links": {
                "self": {
                    "href": "/api/network/fc/interfaces/cdeb5591-dec9-11e8-a733-005056bba0e0"
                }
            },
            "name": "lif2",
            "data_protocol": "fc_nvme",
            "port_address": "612e202b",
            "svm": {
                "_links": {
                    "self": {"href": "/api/svm/svms/a5060466-dbab-11e8-bd46-005056bba0e0"}
                },
                "name": "svm3",
                "uuid": "a5060466-dbab-11e8-bd46-005056bba0e0",
            },
            "wwpn": "20:05:00:50:56:bb:a0:e0",
            "wwnn": "20:02:00:50:56:bb:a0:e0",
            "enabled": True,
            "state": "down",
            "uuid": "cdeb5591-dec9-11e8-a733-005056bba0e0",
            "location": {
                "home_node": {
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/e85aa147-db83-11e8-9a48-005056bb1ec6"
                        }
                    },
                    "name": "node3",
                    "uuid": "e85aa147-db83-11e8-9a48-005056bb1ec6",
                },
                "node": {
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/e85aa147-db83-11e8-9a48-005056bb1ec6"
                        }
                    },
                    "name": "node3",
                    "uuid": "e85aa147-db83-11e8-9a48-005056bb1ec6",
                },
                "port": {
                    "_links": {
                        "self": {
                            "href": "/api/network/fc/ports/24bb636a-db83-11e8-9a49-005056bb1ec6"
                        }
                    },
                    "name": "1b",
                    "node": {"name": "node3"},
                    "uuid": "24bb636a-db83-11e8-9a49-005056bb1ec6",
                },
                "home_port": {
                    "_links": {
                        "self": {
                            "href": "/api/network/fc/ports/24bb636a-db83-11e8-9a49-005056bb1ec6"
                        }
                    },
                    "name": "1b",
                    "node": {"name": "node3"},
                    "uuid": "24bb636a-db83-11e8-9a49-005056bb1ec6",
                },
            },
        }
    )

### Retrieving all properties for all FC interfaces

This example uses the `fields` query parameter to retrieve all properties.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

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

Try it out

    [
        FcInterface(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/interfaces/cdeb5591-dec9-11e8-a733-005056bba0e0"
                    }
                },
                "name": "lif2",
                "data_protocol": "fc_nvme",
                "port_address": "612e202b",
                "svm": {
                    "_links": {
                        "self": {
                            "href": "/api/svm/svms/a5060466-dbab-11e8-bd46-005056bba0e0"
                        }
                    },
                    "name": "svm3",
                    "uuid": "a5060466-dbab-11e8-bd46-005056bba0e0",
                },
                "wwpn": "20:05:00:50:56:bb:a0:e0",
                "wwnn": "20:02:00:50:56:bb:a0:e0",
                "enabled": True,
                "state": "down",
                "uuid": "cdeb5591-dec9-11e8-a733-005056bba0e0",
                "location": {
                    "home_node": {
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/e85aa147-db83-11e8-9a48-005056bb1ec6"
                            }
                        },
                        "name": "node3",
                        "uuid": "e85aa147-db83-11e8-9a48-005056bb1ec6",
                    },
                    "node": {
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/e85aa147-db83-11e8-9a48-005056bb1ec6"
                            }
                        },
                        "name": "node3",
                        "uuid": "e85aa147-db83-11e8-9a48-005056bb1ec6",
                    },
                    "port": {
                        "_links": {
                            "self": {
                                "href": "/api/network/fc/ports/24bb636a-db83-11e8-9a49-005056bb1ec6"
                            }
                        },
                        "name": "1b",
                        "node": {"name": "node3"},
                        "uuid": "24bb636a-db83-11e8-9a49-005056bb1ec6",
                    },
                    "home_port": {
                        "_links": {
                            "self": {
                                "href": "/api/network/fc/ports/24bb636a-db83-11e8-9a49-005056bb1ec6"
                            }
                        },
                        "name": "1b",
                        "node": {"name": "node3"},
                        "uuid": "24bb636a-db83-11e8-9a49-005056bb1ec6",
                    },
                },
            }
        ),
        FcInterface(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/interfaces/f6045b92-dec7-11e8-a733-005056bba0e0"
                    }
                },
                "name": "lif1",
                "data_protocol": "fcp",
                "port_address": "9da2cb1",
                "svm": {
                    "_links": {
                        "self": {
                            "href": "/api/svm/svms/cf300f5c-db83-11e8-bd46-005056bba0e0"
                        }
                    },
                    "name": "svm1",
                    "uuid": "cf300f5c-db83-11e8-bd46-005056bba0e0",
                },
                "wwpn": "20:04:00:50:56:bb:a0:e0",
                "wwnn": "20:00:00:50:56:bb:a0:e0",
                "enabled": True,
                "state": "down",
                "uuid": "f6045b92-dec7-11e8-a733-005056bba0e0",
                "location": {
                    "home_node": {
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/bafe9b9f-db81-11e8-bd46-005056bba0e0"
                            }
                        },
                        "name": "node1",
                        "uuid": "bafe9b9f-db81-11e8-bd46-005056bba0e0",
                    },
                    "node": {
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/bafe9b9f-db81-11e8-bd46-005056bba0e0"
                            }
                        },
                        "name": "node1",
                        "uuid": "bafe9b9f-db81-11e8-bd46-005056bba0e0",
                    },
                    "port": {
                        "_links": {
                            "self": {
                                "href": "/api/network/fc/ports/300c1ae3-db82-11e8-bd46-005056bba0e0"
                            }
                        },
                        "name": "0a",
                        "node": {"name": "node1"},
                        "uuid": "300c1ae3-db82-11e8-bd46-005056bba0e0",
                    },
                    "home_port": {
                        "_links": {
                            "self": {
                                "href": "/api/network/fc/ports/300c1ae3-db82-11e8-bd46-005056bba0e0"
                            }
                        },
                        "name": "0a",
                        "node": {"name": "node1"},
                        "uuid": "300c1ae3-db82-11e8-bd46-005056bba0e0",
                    },
                },
            }
        ),
    ]

### Retrieving a list of selected FC interfaces

This example uses property query parameters to retrieve FC interfaces configured for the FC Protocol that are set to up.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(list(FcInterface.get_collection(data_protocol="fcp", state="up")))

Try it out

    [
        FcInterface(
            {
                "_links": {
                    "self": {
                        "href": "/api/network/fc/interfaces/f6045b92-dec7-11e8-a733-005056bba0e0"
                    }
                },
                "name": "lif1",
                "data_protocol": "fcp",
                "svm": {
                    "_links": {
                        "self": {
                            "href": "/api/svm/svms/cf300f5c-db83-11e8-bd46-005056bba0e0"
                        }
                    },
                    "name": "svm1",
                    "uuid": "cf300f5c-db83-11e8-bd46-005056bba0e0",
                },
                "state": "up",
                "uuid": "f6045b92-dec7-11e8-a733-005056bba0e0",
            }
        )
    ]

### Retrieving a specific FC interface

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = FcInterface(uuid="cdeb5591-dec9-11e8-a733-005056bba0e0")
        resource.get()
        print(resource)

Try it out

    FcInterface(
        {
            "_links": {
                "self": {
                    "href": "/api/network/fc/interfaces/cdeb5591-dec9-11e8-a733-005056bba0e0"
                }
            },
            "name": "lif2",
            "statistics": {
                "iops_raw": {"other": 3, "write": 0, "total": 3, "read": 0},
                "latency_raw": {"other": 38298, "write": 0, "total": 38298, "read": 0},
                "timestamp": "2019-04-09T05:50:42+00:00",
                "throughput_raw": {"write": 0, "total": 0, "read": 0},
                "status": "ok",
            },
            "data_protocol": "fc_nvme",
            "port_address": "612e202b",
            "metric": {
                "duration": "PT15S",
                "latency": {"other": 0, "write": 0, "total": 0, "read": 0},
                "throughput": {"write": 0, "total": 0, "read": 0},
                "timestamp": "2019-04-09T05:50:15+00:00",
                "iops": {"other": 0, "write": 0, "total": 0, "read": 0},
                "status": "ok",
            },
            "svm": {
                "_links": {
                    "self": {"href": "/api/svm/svms/a5060466-dbab-11e8-bd46-005056bba0e0"}
                },
                "name": "svm3",
                "uuid": "a5060466-dbab-11e8-bd46-005056bba0e0",
            },
            "wwpn": "20:05:00:50:56:bb:a0:e0",
            "wwnn": "20:02:00:50:56:bb:a0:e0",
            "enabled": True,
            "state": "down",
            "uuid": "cdeb5591-dec9-11e8-a733-005056bba0e0",
            "location": {
                "home_node": {
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/e85aa147-db83-11e8-9a48-005056bb1ec6"
                        }
                    },
                    "name": "node3",
                    "uuid": "e85aa147-db83-11e8-9a48-005056bb1ec6",
                },
                "node": {
                    "_links": {
                        "self": {
                            "href": "/api/cluster/nodes/e85aa147-db83-11e8-9a48-005056bb1ec6"
                        }
                    },
                    "name": "node3",
                    "uuid": "e85aa147-db83-11e8-9a48-005056bb1ec6",
                },
                "port": {
                    "_links": {
                        "self": {
                            "href": "/api/network/fc/ports/24bb636a-db83-11e8-9a49-005056bb1ec6"
                        }
                    },
                    "name": "1b",
                    "node": {"name": "node3"},
                    "uuid": "24bb636a-db83-11e8-9a49-005056bb1ec6",
                },
                "home_port": {
                    "_links": {
                        "self": {
                            "href": "/api/network/fc/ports/24bb636a-db83-11e8-9a49-005056bb1ec6"
                        }
                    },
                    "name": "1b",
                    "node": {"name": "node3"},
                    "uuid": "24bb636a-db83-11e8-9a49-005056bb1ec6",
                },
            },
        }
    )

## Disabling an FC interface

When updating certain properties or deleting an FC interface, the interface must first be disabled using the following:

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = FcInterface(uuid="f6045b92-dec7-11e8-a733-005056bba0e0")
        resource.enabled = False
        resource.patch()

### Moving an FC interface to a new node and port

To move an FC interface to another node or port, the destination FC port must be specified in a PATCH request. Either the port UUID or node and port names can be used to identify the port.
Note that only FC interfaces configured for the FC Protocol can be moved. FC interfaces configured for NVMe/FC cannot be moved. The interface must also be set to the disabled state before being moved.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = FcInterface(uuid="f6045b92-dec7-11e8-a733-005056bba0e0")
        resource.location = {"home_port": {"uuid": "a1dc7aa5-db83-11e8-9ef7-005056bbbbcc"}}
        resource.patch()

### Deleting an FC interface

The FC interface must be disabled before being deleted.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = FcInterface(uuid="f6045b92-dec7-11e8-a733-005056bba0e0")
        resource.delete()

### Recommending interface locations for a new SVM

This example gets recommendations for FCP network interfaces for a new SVM.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(
            list(
                FcInterface.get_collection(fields="*", **{"recommend.data_protocol": "fcp"})
            )
        )

Try it out

    [
        FcInterface(
            {
                "comment": "fabric: 55:0e:b1:a0:20:40:80:00",
                "data_protocol": "fcp",
                "location": {
                    "home_port": {
                        "_links": {
                            "self": {
                                "href": "/api/network/fc/ports/300c1ae3-db82-11e8-bd46-005056bba0e0"
                            }
                        },
                        "name": "0a",
                        "node": {"name": "node1"},
                        "uuid": "300c1ae3-db82-11e8-bd46-005056bba0e0",
                    }
                },
            }
        ),
        FcInterface(
            {
                "comment": "fabric: 55:0e:b1:a0:20:40:80:00",
                "data_protocol": "fcp",
                "location": {
                    "home_port": {
                        "_links": {
                            "self": {
                                "href": "/api/network/fc/ports/ad7d3915-db82-11e8-b36d-005056bb982e"
                            }
                        },
                        "name": "0a",
                        "node": {"name": "node2"},
                        "uuid": "ad7d3915-db82-11e8-b36d-005056bb982e",
                    }
                },
            }
        ),
        FcInterface(
            {
                "comment": "fabric: 55:0e:b1:a0:20:40:80:01",
                "data_protocol": "fcp",
                "location": {
                    "home_port": {
                        "_links": {
                            "self": {
                                "href": "/api/network/fc/ports/300c1dfd-db82-11e8-bd46-005056bba0e0"
                            }
                        },
                        "name": "0b",
                        "node": {"name": "node1"},
                        "uuid": "300c1dfd-db82-11e8-bd46-005056bba0e0",
                    }
                },
            }
        ),
    ]

### Proposing interface locations for a new SVM

This example requests that caller-proposed locations for FC-NVMe interfaces on two nodes be evaluated.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import FcInterface

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(
            list(
                FcInterface.get_collection(
                    fields="*",
                    **{
                        "recommend.data_protocol": "fc_nvme",
                        "recommend.proposed.locations.port.uuid": "300c2786-db82-11e8-bd46-005056bba0e0,ad7d47d6-db82-11e8-b36d-005056bb982e",
                    }
                )
            )
        )

Try it out

    []

## Classes

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

  A Fibre Channel (FC) interface is the logical endpoint for FC network connections to an SVM. An FC interface provides FC access to storage within the interface SVM using either Fibre Channel Protocol or NVMe over Fibre Channel (NVMe/FC).
  An FC interface is created on an FC port which is located on a cluster node. The FC port must be specified to identify the location of the interface for a POST or PATCH operation that relocates an interface. You can identify the port by supplying either the cluster node and port names or the port UUID.

  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 FcInterface 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 delete_collection (*args, records: Iterable[_ForwardRef('FcInterface')] = None, body: Union[Resource, dict] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Deletes an FC interface.

    ### Related ONTAP commands

    - `network interface delete`

    ### Learn more

    - `DOC /network/fc/interfaces`

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

    All records on the host which match the query will be deleted.

    ## 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 delete 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 deleted from the host.
    `body`
      The body of the delete request. This could be a Resource instance or a dictionary 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 be sent as query parameters to the host. Only resources matching this query will be deleted.

    ## Returns

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

    ## Raises

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

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

    Retrieves FC interfaces.

    ### Related ONTAP commands

    - `network interface show`
    - `vserver fcp interface show`

    ### Learn more

    - `DOC /network/fc/interfaces`

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

    ### Related ONTAP commands

    - `network interface show`
    - `vserver fcp interface show`

    ### Learn more

    - `DOC /network/fc/interfaces`

    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` 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('FcInterface')] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Updates an FC interface.

    ### Related ONTAP commands

    - `network interface modify`

    ### Learn more

    - `DOC /network/fc/interfaces`

    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

  `def post_collection (records: Iterable[_ForwardRef('FcInterface')], *args, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, connection: HostConnection = None, **kwargs) -> Union[List[FcInterface], NetAppResponse]`

    Creates an FC interface.

    ### Required properties

    - `svm.uuid` or `svm.name` - Existing SVM in which to create the FC interface.
    - `name` - Name of the FC interface.
    - `location.port.uuid` or both `location.port.name` and `location.port.node.name` - FC port on which to create the FC interface.
    - `data_protocol` - Data protocol for the FC interface.

    ### Default property values

    If not specified in POST, the following default property values are assigned. * `enabled` - true

    ### Related ONTAP commands

    - `network interface create`

    ### Learn more

    - `DOC /network/fc/interfaces`

    Send this collection of objects to the host as a creation request.

    ## Args

    `records`
      A list of `Resource` objects to send to the server to be created.
    `*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 create a bar for a particular foo, the foo.name value should be passed.
    `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 each object. When hydrate is set to True, poll must also be set to True.
    `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 list of `Resource` objects matching the provided type which have been created by the host and returned. This is not the same list that was provided, so to continue using the object, you should save this list. If poll is set to False, then a `NetAppResponse` object is returned instead.

    ## Raises

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

  ### Methods

  `def delete (self, body: Union[Resource, dict] = None, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse`

    Deletes an FC interface.

    ### Related ONTAP commands

    - `network interface delete`

    ### Learn more

    - `DOC /network/fc/interfaces`

    Send a deletion request to the host for this object.

    ## Args

    `body`
      The body of the delete request. This could be a Resource instance or a dictionary 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.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

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

    ## Raises

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

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

    Retrieves an FC interface.

    ### 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. * `statistics.*` * `metric.*`

    ### Related ONTAP commands

    - `network interface show`
    - `vserver fcp interface show`

    ### Learn more

    - `DOC /network/fc/interfaces`

    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

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

    Updates an FC interface.

    ### Related ONTAP commands

    - `network interface modify`

    ### Learn more

    - `DOC /network/fc/interfaces`

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

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

    Creates an FC interface.

    ### Required properties

    - `svm.uuid` or `svm.name` - Existing SVM in which to create the FC interface.
    - `name` - Name of the FC interface.
    - `location.port.uuid` or both `location.port.name` and `location.port.node.name` - FC port on which to create the FC interface.
    - `data_protocol` - Data protocol for the FC interface.

    ### Default property values

    If not specified in POST, the following default property values are assigned. * `enabled` - true

    ### Related ONTAP commands

    - `network interface create`

    ### Learn more

    - `DOC /network/fc/interfaces`

    Send this object to the host as a creation request.

    ## 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.
    `**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`
`class FcInterfaceSchema (*, 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 FcInterface object

  ### Ancestors

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

  ### Class variables

  `comment: str GET POST PATCH`

    A user configurable comment. Optional in POST; valid in PATCH. To clear a prior comment, set the property to an empty string in PATCH.

  `data_protocol: str GET POST`

    The data protocol for which the FC interface is configured. Required in POST.

    Valid choices:

    - fcp
    - fc_nvme
  `enabled: bool GET POST PATCH`

    The administrative state of the FC interface. The FC interface can be disabled to block all FC communication with the SVM through this interface. Optional in POST and PATCH; defaults to true (enabled) in POST.

  `links: SelfLink GET`

    The links field of the fc_interface.

  `location: FcInterfaceLocation GET POST PATCH`

    The location field of the fc_interface.

  `metric: PerformanceMetricReducedThroughput GET`

    The metric field of the fc_interface.

  `name: str GET POST PATCH`

    The name of the FC interface. Required in POST; optional in PATCH.

    Example: fc_lif1

  `port_address: str GET`

    The port address of the FC interface. Each FC port in an FC switched fabric has its own unique FC port address for routing purposes. The FC port address is assigned by a switch in the fabric when that port logs in to the fabric. This property refers to the address given by a switch to the FC interface when the SVM performs a port login (PLOGI).
    This is useful for obtaining statistics and diagnostic information from FC switches.
    This is a hexadecimal encoded numeric value.

    Example: 5060F

  `state: str GET`

    The current operational state of the FC interface. The state is set to down if the interface is not enabled.
    If the cluster node hosting the port is down or unavailable, no state value is returned.

    Valid choices:

    - up
    - down
  `statistics: PerformanceMetricRawReducedThroughput GET`

    The statistics field of the fc_interface.

  `svm: Svm GET POST PATCH`

    The svm field of the fc_interface.

  `uuid: str GET`

    The unique identifier of the FC interface. Required in the URL.

    Example: bce9827d-4d8f-60af-c771-6e8e9af2c6f0

  `wwnn: str GET`

    The world wide node name (WWNN) of the FC interface SVM. The WWNN is generated by ONTAP when Fibre Channel Protocol or the NVMe service is created for the FC interface SVM.

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

  `wwpn: str GET`

    The world wide port name (WWPN) of the FC interface. The WWPN is generated by ONTAP when the FC interface is created.

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