- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Basic problem with adding a host in an MDS via mgm...
- 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
Basic problem with adding a host in an MDS via mgmt_cli
Hi, I'm trying to do some batch imports from one domain to another, but I'm having a strange issue out of the gate. When I do a simple "mgmt_cli add", it adds an object to the "MDS" domain instead of the "Core" domain I'm trying to get.
[Expert@mds-1:0]# mgmt_cli login user [me] domain Core
Password:
uid: "b1f49fd8-daa1-4d0c-ad3e-38f57e75b1b1"
sid: "zQtNUq5L8HG_QI5Zk5v4Vl684kcPezUlG9S2Ef37IaE"
url: "https://127.0.0.1:443/web_api"
session-timeout: 600
last-login-was-at:
posix: 1568061885668
iso-8601: "2019-09-09T13:44-0700"
api-server-version: "1.1"
[Expert@mds-1:0]# mgmt_cli add host name blah ipv4-address 1.2.3.4
Username: [me]
Password:
---------------------------------------------
Time: [13:55:31] 19/9/2019
---------------------------------------------
"Publish operation" succeeded (100%)
[Expert@mds-1:0]# mgmt_cli publish
Username: bcotter
Password:
---------------------------------------------
Time: [13:57:04] 19/9/2019
---------------------------------------------
"Publish operation" succeeded (100%)
tasks:
- task-id: "01234567-89ab-cdef-a3c4-f6cd65a7062f"
task-name: "Publish operation"
status: "succeeded"
progress-percentage: 100
suppressed: false
task-details:
- publishResponse:
numberOfPublishedChanges: 0
revision: "90f810f4-7130-4122-a704-f40810b20fb8"
The object doesn't show up in the Core domain, but rather ends up getting created in "MDS," which I didn't even know had an object database. I'm attaching the audit log from SmartConsole.
What did I do wrong?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Figured it out from https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/multidomain-and-mgmt-cli/m-p/2801...
I was not referencing a session file. Adding "> id.txt" to the "mgmt_cli login" command, and "-s id.txt" to the "mgmt_cli add" command had the desired results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Figured it out from https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/multidomain-and-mgmt-cli/m-p/2801...
I was not referencing a session file. Adding "> id.txt" to the "mgmt_cli login" command, and "-s id.txt" to the "mgmt_cli add" command had the desired results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
