Skip to content
R1-MCP
Get Support

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.

Three element types:

typeThe object
wlanA WLAN (Wi-Fi network)
switchProfileA switch profile, with its VLANs and ACLs
ethernetPortProfileAn 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.

  1. element_extract — identify the object by type plus either id (preferred, unambiguous) or name (matched exactly, and refused if more than one object shares it). Optionally connection to read from a non-default tenant. Like venue_extract it is chunked: if it comes back complete: false, call it again with the same snapshotId.

  2. element_copy_plan — pass the completed snapshotId and targetConnection. 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. connection is accepted as an alias for targetConnection; passing both with different values is refused with ambiguous_target_connection, and an unknown key is an error rather than being ignored.

  3. mop_replay { mopId, dryRun: true } — review every step.

  4. mop_replay { mopId, armWrites: true } — run it. Arming names the target tenant first.

  5. element_copy_verify { runId } — confirm it landed.

Reverse it with venue_copy_undo { runId }. No venue is deleted, because none was created.

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.

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.

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.