The Autodiscovery functionality has guard rails built in that discovery via REST does not. What are the Best practices for device discovery via REST in Spectrum?
Duplicate are the biggest cause of problems, especially if reusing ips directly after deletion.
1. Add check on the script to avoid duplicates. Check if the new ip to be modelled already exist on the SS in questions and if so, do not model.
2. Add check to the script to see if primary SS are up, if not - do not model. we do not support or allow modeling on the secondary in Spectrum but we cannot control or avoid that when a script is used. The potential problems is if the primary is down and new models are placed on the secondary, when the primary comes back up, the new alarms will be passed from the secondary but not the new models, so they will not be synched to the primary.
http://<OneClick Server>:<port>/spectrum/restful/landscapes
expected response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><landscape-response total-landscapes="1"><landscape><id>0x1000000</id><name>SS_name</name><isPrimary>true</isPrimary><spectrumVersion>23.3.1.000</spectrumVersion></landscape></landscape-response>
3. If deleting a device of a specific ip, it will take time to be removed so do not model straight away after a deletion of a used ip. Again step1 will avoid this.
4. If using a DSS that has IP domains and scripting membership after discovery, while each landscape will have the same IP Domains, the model handle is different on each landscape, even though they refer to the same IP domain or Global Collection.
Other options that may be of interest after discovering
https://knowledge.broadcom.com/external/article?articleId=52123