Sending by email as I’m unable to create new discussions:
Hello,
I know this subject has been talked here, but I haven't found (or right searched) any solution to use SWISS to update one IP status to "used". I know it's not supported as described here:
Print Article - How to use SolarWinds Query Language (SWQL)<http://knowledgebase.solarwinds.com/kb/questions/4543/__print>
QUOTE: "
Common SQL Constructs Not Supported
SWQL does not support the following common SQL constructs:
Note: You must use CRUD operations to create, read, update, or delete entities.
SELECT * FROM … (You must list the actual properties you want to select.)
UPDATE, INSERT, DELETE, etc. (You can only use SWQL to read data.)
"
So, as I'm newbie I would like to ask you guys:
- Where are exactly those CRUD operations ? It would be by using web interface ?
- If not, how could I update an IP to "used" status by using SOAP/JSON/SWISS ?
What do I have now, on my lab:
- get next free IP adress
Reference: How to use the IPAM API and get "Free IP Address"
code:
curl --insecure -H "Content-Type: application/json" -d "{\"query\":\ I WHERE Status=2 AND I.Subnet.DisplayName = 'DEV'\"}" "https://admin@my_host:17778/SolarWinds/InformationService/v3/Json/Query"
{"results":[{"Status":2,"DisplayName":"192.168.0.11"}]}
- Allocate one IP
code:
begin tran
update IPAM_node set Status = 1
where IPAddress = '192.168.0.11'
commit
So, if I can't (or if it's not possible yet) use SWISS/JSON, I would start a simple wrapper (RESTful) that will connect to the dabatase and update (old school) but it would work for us...
Thank you,
regards