Hey Val, thanks for the tip. I've already dumped the new interface configs on the box using a sed script to change the interface names from original to new (e.g. eth1-02.2049 --> bond0.2049) and imported using load config (with clienv set to continue on failure for things like invalid descriptions for static-routes). So the target devices already have the interface config.
The problem I was facing was either get topology in the console only gets interfaces that are active/on, and 59 of 60 logical interfaces are in the off state - this is necessary because all the production VLANs are on the same physical port channel as in-band management and we don't have sufficient addressing to stand up temporary IPs while connected to the same switch fabric. We could use dummy IPs but that would defeat the purpose of pre-building the cluster.
Manually adding the topology is going to be very risky with copy/paste for each sub-interface and anti-spoofing groups so I wanted to script it like I have for VSX (easy with the provisioning tool).
I've managed to export the topo from mgmt_cli, if I can massage the exported JSON to match the target interface names (again using a sed script) surely I can POST it to the API to update the new cluster members:
"uid" : "***",
"name" : "old_cluster",
"type" : "simple-cluster",
"domain" : {
"uid" : "***",
"name" : "SMC User",
"domain-type" : "domain"
},
"cluster-mode" : "cluster-xl-ha",
"cluster-members" : [ {
"name" : "DC1-FIR-PR-01",
"sic-state" : "communicating",
"sic-message" : "Trust established",
"ip-address" : "10.0.1.254",
"interfaces" : [ {
"name" : "Sync",
"ipv4-address" : "169.254.0.1",
"ipv4-network-mask" : "255.255.255.240",
"ipv4-mask-length" : 28,
"ipv6-address" : ""
}, {
"name" : "eth1-02.400",
"ipv4-address" : "192.168.249.148",
"ipv4-network-mask" : "255.255.255.248",
"ipv4-mask-length" : 29,
"ipv6-address" : ""
},
So I thought I would fire up Postman in my lab, it's much better at these things than mgmt_cli (I could use cURL if needed). I found the Postman collections for the version I'm running here and converted the collection to v2. This has simplified authentication and session management and allowed me to run some tests based on the collection samples (login, show simple-cluster, set simple-cluster, publish and task management).
I haven't imported the topology yet but it's looking promising - I'll post back here with my findings.