Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
scripting_guru
Explorer

scripting deleting a host object using python

I wrote my python script using python3 to script the deletion process of a host object. The error is related to a missing key 'uid' in the rule dictionary of my code. I tried to print my rule but it looks like it is not pulling the uid of the host object but it is pulling uid of the rule and others. how can I correct this so it can also pull the uid for the host object. I will attach the code but also post the error. FYI I am using jupyter notebook as my dev environment. 

"Error: Key 'uid' is missing in rule dictionary: {'rule': {'uid': '09bf0dea-5d3c-429d-890f-4bf9b5eb99b5', 'name': 'testaccess', 'type': 'access-rule', 'domain': {'uid': '41e821a0-3720-11e3-aa6e-0800200c9fde', 'name': 'SMC User', 'domain-type': 'domain'}}, 'rule-columns': ['source'], 'position': '13', 'layer': {'uid': 'e062bc425-1f8b-4487-a64f-661f85084a6d', 'name': 'Pennsylvania Security', 'type': 'access-layer', 'domain': {'uid': '41e1821a0-3720-11e3-a1a6e-0800200c9fde', 'name': 'SMC User', 'domain-type': 'domain'}}, 'layer-position': 1, 'package': {'uid': '93b650bc-8b28-4587-8641-73f225d7e3c8c', 'name': 'Pennsylvania', 'type': 'package', 'domain': {'uid': '41e821a0-3720-11e3-aa6e-08010200c9fde', 'name': 'SMC User', 'domain-type': 'domain'}}}" Error: 'object'

 

 

I am on R840

0 Kudos
1 Reply
PhoneBoy
Admin
Admin

What are the exact API calls being made?

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events