Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
mbaerwolff
Participant
Jump to solution

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.

0 Kudos
1 Solution

Accepted Solutions
Bob_Zimmerman
Mentor
Mentor

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.

View solution in original post

(1)
3 Replies
the_rock
Legend
Legend
0 Kudos
Bob_Zimmerman
Mentor
Mentor

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.

(1)
mbaerwolff
Participant

Thanks for the advice. It worked without any problems 😀

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events