Class PortOperator.PortUpdater
java.lang.Object
com.eqixiac.equinix.fabric.model.json.creators.PortOperator.PortUpdater
- Enclosing class:
PortOperator
Fluent builder for updating an existing port. Each typed setter records a
replace
change operation; save() sends them as one PATCH (an op/path/value array,
content-type application/json) and returns the refreshed model.
port.update().name("New-Name").save();- Author:
- ianjones
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondryRun()Marks this update as a validate-only dry run:save()sendsPATCH /fabric/v4/ports/{uuid}?dryRun=true(spec: "option to verify that API calls will succeed"; boolean, defaultfalse).encapsulation(EncapsulationType type, String tagProtocolId) Replaces the port encapsulation and its tag protocol identifier (TPID), as in the spec'sPortUpdateEncapsulationAndTagprotocolIdRequestexample:[{"op":"replace","path":"/encapsulation","value":{"type":"DOT1Q","tagProtocolId":"0x8100"}}].lagEnabled(boolean lagEnabled) Enables or disables LAG on the port (/lagEnabled, spec examplePortUpdateLagEnabledRequest).Replaces the port name.patch(PatchOperation operation) Adds an arbitrary change operation, for paths not covered by the typed setters above.save()Applies the accumulated changes and returns the port refreshed from the server.
-
Constructor Details
-
PortUpdater
-
-
Method Details
-
dryRun
Marks this update as a validate-only dry run:save()sendsPATCH /fabric/v4/ports/{uuid}?dryRun=true(spec: "option to verify that API calls will succeed"; boolean, defaultfalse). Nothing is changed on the port.Wire-shape caveat: unlike the real update's bare
Portbody, the dry-run200body is anAllPortsResponsepaginated envelope ({pagination, data:[Port]}) carrying the simulated updated port indata[0](spec examplePortUpdateDryRunResponse); the SDK deserializes that envelope and unwrapsdata[0]into thePortreturned bysave().- Returns:
- this updater
-
name
Replaces the port name.- Parameters:
name- the new name- Returns:
- this updater
-
encapsulation
Replaces the port encapsulation and its tag protocol identifier (TPID), as in the spec'sPortUpdateEncapsulationAndTagprotocolIdRequestexample:[{"op":"replace","path":"/encapsulation","value":{"type":"DOT1Q","tagProtocolId":"0x8100"}}].- Parameters:
type- the encapsulation type (DOT1Q,QINQorUNTAGGED)tagProtocolId- the TPID as four hex digits with a0xprefix, for example0x8100or0x88A8;nullto leave it out- Returns:
- this updater
-
lagEnabled
Enables or disables LAG on the port (/lagEnabled, spec examplePortUpdateLagEnabledRequest).- Parameters:
lagEnabled- whether LAG is enabled- Returns:
- this updater
-
patch
Adds an arbitrary change operation, for paths not covered by the typed setters above.- Parameters:
operation- the patch operation- Returns:
- this updater
-
save
-