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

Where-Used Fails for Access Layers?

Some of my management servers have accumulated a lot of old access layers which I suspect aren't used. I want to clean them up, but just noticed something weird:

[Expert@DallasSA]# layerUuid=$(mgmt_cli -f json -r true show access-layers | jq -c '."access-layers"[0]|.uid')
[Expert@DallasSA]# mgmt_cli -f json -r true show object uid "$layerUuid"
{
  "object" : {
    "uid" : "ccf410ea-85fc-4194-8b8d-7417d3999ac8",
    "name" : "InstalledNowhere Network",
    "type" : "access-layer",
    "domain" : {
      "uid" : "41e821a0-3720-11e3-aa6e-0800200c9fde",
      "name" : "SMC User",
      "domain-type" : "domain"
    },
    "icon" : "ApplicationFirewall/rulebase",
    "color" : "black"
  }
}
[Expert@DallasSA]# mgmt_cli -f json -r true where-used uid "$layerUuid"
{
  "code" : "generic_err_object_not_found",
  "message" : "Requested object [ccf410ea-85fc-4194-8b8d-7417d3999ac8] not found"
}

Where Used appears to not support finding where an access layer is used.

When showing access layers, the container structure has an "access-layers" key instead of an "objects" key. I guess access layers don't count as objects? Is this intended, or just something nobody has reported before?

0 Kudos
1 Solution

Accepted Solutions
Omer_Kleinstern
Employee
Employee

The where-used API does not support layers

View solution in original post

5 Replies
the_rock
Legend
Legend

I got same thing on 2 lab mgmt servers, both R81.20 jumbo 53

 

[Expert@cpazuremgmt:0]# layerUuid=$(mgmt_cli -f json -r true show access-layers | jq -c '."access-layers"[0]|.uid')
[Expert@cpazuremgmt:0]# mgmt_cli -f json -r true show object uid "$layerUuid"
{
"object" : {
"uid" : "30282496-99f7-423a-9e67-f803d267b178",
"name" : "azure-cluster-lab-policy Network",
"type" : "access-layer",
"domain" : {
"uid" : "41e821a0-3720-11e3-aa6e-0800200c9fde",
"name" : "SMC User",
"domain-type" : "domain"
},
"icon" : "ApplicationFirewall/rulebase",
"color" : "black"
}
}
[Expert@cpazuremgmt:0]# mgmt_cli -f json -r true where-used uid "$layerUuid"
{
"code" : "generic_err_object_not_found",
"message" : "Requested object [30282496-99f7-423a-9e67-f803d267b178] not found"
}
[Expert@cpazuremgmt:0]#

0 Kudos
PhoneBoy
Admin
Admin
0 Kudos
Omer_Kleinstern
Employee
Employee

The where-used API does not support layers

the_rock
Legend
Legend

Thank you for confirming @Omer_Kleinstern 

Andy

0 Kudos
Bob_Zimmerman
Authority
Authority

In SmartConsole, when you try to delete a layer and it's used somewhere, it pops up the Where Used dialog, so I started there. Is there any equivalent to be sure an access layer isn't used before I try to delete it?

The only things which can use an access layer are policy packages and access rules, right? I guess worst case I can dump all of the access layers, policy packages, and rules with an inline-layer key, then figure out which layers only show up in the first list.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    Tue 30 Apr 2024 @ 08:00 AM (CDT)

    Central US: What's New in R82?

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Wed 01 May 2024 @ 02:00 PM (EDT)

    South US: HTTPS Inspection Best Practices

    Thu 02 May 2024 @ 11:00 AM (SGT)

    APAC: What's new in R82

    Tue 30 Apr 2024 @ 08:00 AM (CDT)

    Central US: What's New in R82?

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Wed 01 May 2024 @ 02:00 PM (EDT)

    South US: HTTPS Inspection Best Practices

    Thu 02 May 2024 @ 11:00 AM (SGT)

    APAC: What's new in R82
    CheckMates Events