- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Sharing a session with GUI and Gaia/expert
- 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
Sharing a session with GUI and Gaia/expert
I've been toying with mgmt_cli and love the flexibility - is there any way to share this session with the gui? The Command Line given in the GUI works fine, but limits how much I can do in one shot (paste).
I'm aware of the continue-session-in-smartconsole, but that appears to log the mgmt_cli out so no more changes for that session, but the GUI gets the unpublished changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use mgmt_cli -r true, this basically does a login/publish/logout behind the scenes.
If you login with a proper session via mgmt_cli, that session can be "taken over" in SmartConsole just like any other session.
For example:
[Expert@mgmt:0]# mgmt_cli login
Username: phoneboy
Password:
uid: "5195aab6-4db5-409a-8d80-af630bd7cefe"
sid: "sJU7Ql86il8u7Fn3DGjgZ2fNTM5ZzELYiLkZCTdg2CU"
url: "https://127.0.0.1:443/web_api"
session-timeout: 600
last-login-was-at:
posix: 1544277634568
iso-8601: "2018-12-08T06:00-0800"
api-server-version: "1.3"
[Expert@mgmt:0]# mgmt_cli --session-id sJU7Ql86il8u7Fn3DGjgZ2fNTM5ZzELYiLkZCTdg2CU add-host name foobar ipv4-address 3.1.3.7
Now you can see the session in SmartConsole and take it over:
And the object I created via mgmt_cli is there:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, but the session is "taken over" - is there any way to get the session back to my mgmt_cli? Ideally, it would be nice to share the session between the mgmt_cli and the gui so I can work and compare.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/take-over-session~v1.4%20
Basically, two things cannot use the same session at the same time.
But you can easily switch between SmartConsole and mgmt_cli.
