PanOS7.1 Panorama API how can I find out if the Device group is locked?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

PanOS7.1 Panorama API how can I find out if the Device group is locked?

L0 Member
 
1 accepted solution

Accepted Solutions

L4 Transporter

You can get all locks using the operational command API.

 

For example:

 

https://<panorama>/api/?key=<your-API-key>&type=op&cmd=<show><commit-locks/></show>

Note:  That API call will retreive the commit locks.  For config locks, change <commit-locks/> to <config-locks/>.

 

The following text is an example response from that API call perfomed on Panorama 7.1.0.  There are two locks in the example output below.  You can tell by the lines in red that one of these locks is global (shared) and one of these locks is specific to a device-group called "My Device Group".

 

<response status="success">
    <result>
        <commit-locks>
            <entry name="admin">
                <type>dg</type>
                <name>My Device Group</name>
                <created>2016/05/18 20:17:41</created>
                <last-activity>2016/05/18 20:17:41</last-activity>
                <loggedin>yes</loggedin>
                <comment>
                    <![CDATA[This is a device-group lock]]>
                </comment>
            </entry>
            <entry name="admin">
                <type>shared</type>
                <name>shared</name>
                <created>2016/05/18 20:17:43</created>
                <last-activity>2016/05/18 20:17:43</last-activity>
                <loggedin>yes</loggedin>
                <comment>
                    <![CDATA[This is a global (shared) lock]]>
                </comment>
            </entry>
        </commit-locks>
    </result>
</response>

View solution in original post

1 REPLY 1

L4 Transporter

You can get all locks using the operational command API.

 

For example:

 

https://<panorama>/api/?key=<your-API-key>&type=op&cmd=<show><commit-locks/></show>

Note:  That API call will retreive the commit locks.  For config locks, change <commit-locks/> to <config-locks/>.

 

The following text is an example response from that API call perfomed on Panorama 7.1.0.  There are two locks in the example output below.  You can tell by the lines in red that one of these locks is global (shared) and one of these locks is specific to a device-group called "My Device Group".

 

<response status="success">
    <result>
        <commit-locks>
            <entry name="admin">
                <type>dg</type>
                <name>My Device Group</name>
                <created>2016/05/18 20:17:41</created>
                <last-activity>2016/05/18 20:17:41</last-activity>
                <loggedin>yes</loggedin>
                <comment>
                    <![CDATA[This is a device-group lock]]>
                </comment>
            </entry>
            <entry name="admin">
                <type>shared</type>
                <name>shared</name>
                <created>2016/05/18 20:17:43</created>
                <last-activity>2016/05/18 20:17:43</last-activity>
                <loggedin>yes</loggedin>
                <comment>
                    <![CDATA[This is a global (shared) lock]]>
                </comment>
            </entry>
        </commit-locks>
    </result>
</response>
  • 1 accepted solution
  • 2385 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!