- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Create host object in global domain with mgmt_...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create host object in global domain with mgmt_cli
Hey there,
I want to create a host object in the global domain using mgmt_cli.
For this purpose I have used the following command so far:
#mgmt_cli add host name "test" ip-address "192.168.178.1" domain.domain-type "global domain"
However, I get the following error on it:
code: "generic_err_invalid_parameter_name"
message: "Unrecognized parameter [domain]".
Has anyone had the same problem?
Quick info: I am using a multi-domain management on version R81.10 with JHF Take 94 as well as API version v1.8.1.
Thanks in advance.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You specify which domain to use when you log in. There are a few special domains: "Global", "MDS", and "System Data". To add a host in the Global domain, you would do something like this:
mgmt_cli -f json -d "Global" -r true login > session.txt
mgmt_cli -f json -s session.txt add host name "test" ip-address "192.168.178.1"
mgmt_cli -f json -s session.txt publish
mgmt_cli -f json -s session.txt assign-global-assignment ...
mgmt_cli -f json -s session.txt logout
rm session.txt
The call to "assign-global-assignment" is needed to actually distribute the object from the Global domain to the CMAs. I'm not 100% sure how it should be called. If you're fine refreshing the global assignment from SmartConsole, you can leave that line out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You specify which domain to use when you log in. There are a few special domains: "Global", "MDS", and "System Data". To add a host in the Global domain, you would do something like this:
mgmt_cli -f json -d "Global" -r true login > session.txt
mgmt_cli -f json -s session.txt add host name "test" ip-address "192.168.178.1"
mgmt_cli -f json -s session.txt publish
mgmt_cli -f json -s session.txt assign-global-assignment ...
mgmt_cli -f json -s session.txt logout
rm session.txt
The call to "assign-global-assignment" is needed to actually distribute the object from the Global domain to the CMAs. I'm not 100% sure how it should be called. If you're fine refreshing the global assignment from SmartConsole, you can leave that line out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the advice. It worked without any problems 😀