Class DeploymentPlan
toMarkdown(), dry-run
validation via dryRun(), and full execution via execute().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondryRun()Re-runs the layered plan-time validation and returns a new plan with the refreshed status.execute()Executes the deployment plan with no extra customer inputs — for a backbone-only plan, or a plan whose provider connections already carry their own authorization keys.execute(ExecutionInputs inputs) Executes the deployment plan, creating all resources in the correct order: Cloud Routers, then provider connections, then backbone links, then routing protocols.rollback(DeploymentOutcome outcome) Best-effort teardown of the resources provisioned by a priorexecute(): deletes the connections (and backbone links), then the Cloud Routers, in reverse dependency order.Generates a full markdown-formatted deployment plan report with bandwidth and pricing tables.Generates a concise plain-text summary of the deployment plan.intTotal number of resources that will be created by this plan.Begins a value-realization assessment of this plan: declare your per-provider monthly egress volumes and get back the egress savings the plan's private interconnects unlock, netted against the plan's actual interconnect cost.
-
Constructor Details
-
DeploymentPlan
public DeploymentPlan()
-
-
Method Details
-
totalResourceCount
public int totalResourceCount()Total number of resources that will be created by this plan. -
toSummary
Generates a concise plain-text summary of the deployment plan. -
toMarkdown
Generates a full markdown-formatted deployment plan report with bandwidth and pricing tables. -
valueRealization
Begins a value-realization assessment of this plan: declare your per-provider monthly egress volumes and get back the egress savings the plan's private interconnects unlock, netted against the plan's actual interconnect cost.PlanValueRealization vr = plan.valueRealization() .egress(CloudProviderType.AWS, 50, DataUnit.TERABYTE) .assess(); System.out.println(vr.toMarkdown());- Returns:
- a
PlanValueAssessmentbuilder for declaring egress volumes
-
dryRun
Re-runs the layered plan-time validation and returns a new plan with the refreshed status.This is the same validation the wizard runs when it builds the plan: Layer 1 structural + catalog checks, Layer 2 live Cloud Router dry-run (
POST /routers?dryRun=true), and Layer 3 connection endpoint dispatch — a connection whose A-side Cloud Router does not exist yet is recorded as deferred (its live endpoint dry-run runs at provisioning, and needs your authorization keys) rather than sent a doomed endpoint-less dry-run, while a connection with a pre-existing endpoint is dry-run for real. Nothing is provisioned: the router dry-run creates nothing, and to-be-created connections are never posted here.A live step that cannot be attempted — an offline / bare-stub run, or a live dry-run that the API answers with a non-rejection failure (403 not entitled, 429 throttled, 5xx, or a transport/timeout error) — is recorded as a skipped validation with a reason, never folded into the errors that invalidate the plan. Only a genuine rejection of a well-formed request (a 4xx validation rejection) is an error.
- Returns:
- a new
DeploymentPlanwith refreshed validity, deferred validations, skipped validations, and the required customer inputs
-
execute
Executes the deployment plan with no extra customer inputs — for a backbone-only plan, or a plan whose provider connections already carry their own authorization keys. Equivalent toexecute(ExecutionInputs.none()): a provider connection that still needs a cloud authorization key fails fast (nothing is provisioned) naming the key to gather.- Returns:
- the execution outcome with all provisioned resources and any errors
- See Also:
-
execute
Executes the deployment plan, creating all resources in the correct order: Cloud Routers, then provider connections, then backbone links, then routing protocols.Execution-time connection pre-flight (Layer 3a). A provider connection's live endpoint dry-run cannot run at plan time because its A-side Cloud Router does not exist yet; it runs here, at the only point it is possible. For each connection, once its A-side FCR is provisioned and its real uuid is known, a full connection body — real A-side uuid, Z-side service profile + seller region + the customer's authorization key, DOT1Q VLAN — is
dry-runagainst the live API; only if the dry-run passes is the connection created for real. A dry-run rejection of a well-formed request (a 4xx validation rejection, e.g. HTTP 400/409) aborts the run and rolls back everything already provisioned (LIFO), so a broken plan never leaves billable Cloud Routers stranded.Pre-flight infeasibility never silently aborts. When the pre-flight dry-run cannot be attempted — an infeasibility rather than a rejection: 401/403 (not entitled), 429 (throttled), 5xx (server-side), or a transport/timeout error, classified by
PlanValidator.classifyLiveFailure(Throwable)— the run does not abort. It records a recoverable warning that the pre-flight could not run and proceeds to the real create, which surfaces any genuine error itself. Only a true rejection aborts and rolls back. The fail-fast on a missing cloud authorization key (below) is unchanged.Required customer inputs. The cloud authorization keys — which a brand-new customer gathers from each cloud console — are supplied via
inputs(keyed by connection name), or carried on the plan itself for a lens-3b plan. Before anything is provisioned, execution fails fast if any provider connection that needs a key is missing one, naming the connection and the exact key (ConnectionInputRequirement).Operational errors (a Cloud Router that does not reach
PROVISIONEDwithin the timeout, a missing upstream dependency) are captured in the outcome rather than thrown, allowing a partial deployment to be inspected androlled backby the caller.An invalid plan never executes. A plan whose validation found hard errors (
isValid() == false) is refused up front with anIllegalStateExceptionlisting every recorded error — executing it would provision billable resources and then fail downstream on the very defects validation already named. Fix the errors and re-plan (ordryRun()again) before executing.- Parameters:
inputs- the per-connection authorization keys, VLAN tags and Azure peering types the customer supplies;nullis treated asExecutionInputs.none()- Returns:
- the execution outcome with all provisioned resources and any errors
- Throws:
IllegalStateException- if the plan is not valid — the message lists the validation errors to fix before re-planning
-
rollback
Best-effort teardown of the resources provisioned by a priorexecute(): deletes the connections (and backbone links), then the Cloud Routers, in reverse dependency order. Routing protocols are removed with their parent connection. Use this to clean up a partially-failed deployment rather than leaving orphaned, billable resources behind.- Parameters:
outcome- the outcome returned byexecute()- Returns:
- the deletions that failed (empty when the rollback was clean)
-