Interface PortClient<T>

All Superinterfaces:
Pageable<T>, PageablePost<T>
All Known Implementing Classes:
PortClientImpl

public interface PortClient<T> extends PageablePost<T>
Author:
ianjones
  • Method Details

    • list

      Page<PortJson> list()
    • search

    • getVlans

      List<PortVlan> getVlans(String portUuid)
    • getByUuid

      PortJson getByUuid(String uuid)
    • refresh

      PortJson refresh(String uuid)
    • create

      PortJson create(PortCreatorJson body)
      Creates a single port (POST /fabric/v4/ports).
      Parameters:
      body - the typed create request
      Returns:
      the created port
    • dryRunCreate

      PortJson dryRunCreate(PortCreatorJson body)
      Validate-only variant of create(PortCreatorJson) (POST /fabric/v4/ports?dryRun=true; spec: "option to verify that API calls will succeed"). No port is ordered - the 200 response is the validated port order echoed back (no uuid/name/state), versus the real create's 202.
      Parameters:
      body - the typed create request to validate
      Returns:
      the validated port order echoed back by the server
    • delete

      PortJson delete(String uuid)
      Deletes a port by uuid (DELETE /fabric/v4/ports/{uuid}).
      Parameters:
      uuid - the unique identifier of the port
      Returns:
      the deleted port as returned by the server
    • dryRunDelete

      PortJson dryRunDelete(String uuid)
      Validate-only variant of delete(String) (DELETE /fabric/v4/ports/{uuid}?dryRun=true; spec: "option to verify that API calls will succeed"). Nothing is deleted - the 200 response is the existing port entity (with uuid/name) that WOULD be deleted, versus the real delete's 202.
      Parameters:
      uuid - the unique identifier of the port
      Returns:
      the port that would be deleted
    • update

      PortJson update(String uuid, List<PatchOperation> operations)
      Updates a port by uuid with a JSON Patch operations array (PATCH /fabric/v4/ports/{uuid}).
      Parameters:
      uuid - the unique identifier of the port
      operations - the op/path/value change operations
      Returns:
      the updated port
    • dryRunUpdate

      PortJson dryRunUpdate(String uuid, List<PatchOperation> operations)
      Validate-only variant of update(String, List) (PATCH /fabric/v4/ports/{uuid}?dryRun=true; spec: "option to verify that API calls will succeed"). Nothing is changed - and unlike the real update's bare Port, the dry-run 200 body is an AllPortsResponse paginated envelope ({pagination, data:[Port]}); implementations deserialize that envelope and return its data[0], the simulated updated port.
      Parameters:
      uuid - the unique identifier of the port
      operations - the op/path/value change operations to validate
      Returns:
      the simulated updated port unwrapped from the envelope's data[0]
    • addToLag

      PhysicalPortsResponseJson addToLag(String portId, List<PhysicalPort> physicalPorts)
      Adds physical ports to a virtual port's LAG (POST /fabric/v4/ports/{portId}/physicalPorts/bulk).
      Parameters:
      portId - the virtual port uuid
      physicalPorts - the physical ports to add
      Returns:
      the full set of physical ports backing the virtual port after the addition