Copying one object
Sometimes you don’t want a venue. You want one WLAN — with its portal, its RADIUS profile, its DPSK pool, and everything else it quietly depends on — moved into another tenant.
That is element copy. It ships with the Copy feature, alongside venue copy, and reuses the same MOP engine, the same review-and-arm cycle, and the same undo.
What you can start from
Section titled “What you can start from”Three element types:
type | The object |
|---|---|
wlan | A WLAN (Wi-Fi network) |
switchProfile | A switch profile, with its VLANs and ACLs |
ethernetPortProfile | An AP ethernet-port (LAN-port) profile |
The point is the closure, not the object. Extracting a WLAN pulls in the shared objects it binds — portal service profile, RADIUS server profiles, DPSK pool and its identity group, VLAN pool, Wi-Fi calling profile, access-control profile and its four child policies — because a WLAN recreated without them is not a working WLAN.
Call element_copy_support for the authoritative list of which domains an
element copy carries. It is a filtered view of
the venue-copy matrix: the tenant-scoped shared
objects reachable downstream of an element, and nothing venue-scoped.
The pipeline
Section titled “The pipeline”-
element_extract— identify the object bytypeplus eitherid(preferred, unambiguous) orname(matched exactly, and refused if more than one object shares it). Optionallyconnectionto read from a non-default tenant. Likevenue_extractit is chunked: if it comes backcomplete: false, call it again with the samesnapshotId. -
element_copy_plan— pass the completedsnapshotIdandtargetConnection. It compiles an apply-MOP that creates the element and its whole closure in the target tenant and wires them to each other. It writes nothing.connectionis accepted as an alias fortargetConnection; passing both with different values is refused withambiguous_target_connection, and an unknown key is an error rather than being ignored. -
mop_replay { mopId, dryRun: true }— review every step. -
mop_replay { mopId, armWrites: true }— run it. Arming names the target tenant first. -
element_copy_verify { runId }— confirm it landed.
Reverse it with venue_copy_undo { runId }. No venue is deleted, because none
was created.
Two things that surprise people
Section titled “Two things that surprise people”Same tenant needs a rename
Section titled “Same tenant needs a rename”Nothing is activated
Section titled “Nothing is activated”An element copy has no venue to activate on, so the element and its closure are created and fully wired — and then left unactivated. Activate them where you want them live afterwards.
This is the deliberate difference from a venue copy, which activates as it goes. It also means element copy carries no venue-scoped configuration at all: no AP radio, mesh, LED, or syslog settings, no AAA servers, no AP groups. Those belong to a venue.
Name collisions in the target
Section titled “Name collisions in the target”The second copy into a tenant you have copied into before is the normal case, and
sharedCollision governs it — the same setting, the same three values, and the
same default (adopt) as a
venue copy.
Matching is by name only; contents are never compared.
element_copy_plan has no collisionPolicy — that setting governs
venue-scoped objects, and an element copy has none. Passing it is refused as an
unknown argument. Use sharedCollision to decide what happens to a same-named
object.
Verifying
Section titled “Verifying”After the copy has run, verify with runId — the plan returns it as
verifyAfterRunWith. Every object the run created is re-read by the id the run
captured, and its live name compared with the name the create sent; every bind is
re-read from the bound profile’s /query row. It needs no other arguments.
Objects the copy adopted are not checked, because the run never wrote them.
Before a run, pass snapshotId instead. That mode queries the target tenant
for the exact name of every object the copy would create, and reports present or
missing. Its checklist comes from the same plan the copy compiled, so pass the
same sharedCollision, domains and rename the copy used (the plan returns
them as verifyWith) — a different policy checks a different list than the copy
created.
In snapshotId mode it separates three outcomes:
- Checked — objects the copy creates, name-verified in the target.
adoptedObjects— objects that already existed and were adopted. These are never name-checked, because the name that would prove them present belongs to the pre-existing object.plannedSkips— objects the compiler deliberately dropped.