Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Greg_Dunlap
Participant

adding generic data center object

i've been working on migrating a lot of our app groups from standard groups with host objects inside them to be generic data center objects.  I've got a front end api written that our dev ops groups are adding to which looks in several json files, finds the right group in the right file, adds a new host IP to the group.   

for the firewall groups that originated before we did the R81 upgrades im running a sync program to find the Checkpoint group, read the json contents, and add IP's where need.

I want to convert these traditional groups to gdc objects which is fine if i've imported it all etc ...

i'd like to have something do a search and see if it's imported and if not import it.

i thought the add-data-center-object would do it but i keep running into errors with key pairs or wrong content.

i know the name and uid of the generic data center file in Checkpoint.   I can get the uid of the group i want to import. but so far it's a no go on usability.

 

has anyone had any success with this ?

0 Kudos
2 Replies
Art_Zalenekas
Employee
Employee

It would help if you could share an actual example of what you are trying to do. Thanks!

0 Kudos
Greg_Dunlap
Participant

i've got a Data Center object names group999

 

{
"objects" : [ {
"uid" : "64e16ac4-84c3-46b7-bd00-8d453b983c0b",
"name" : "group999",
"type" : "data-center-server",
"domain" : {
"uid" : "d0f9678c-e3dc-498e-be00-2238123af99d",
"name" : "IPv6-TestLab",
"domain-type" : "domain"
},
"icon" : "NetworkObjects/ExternalDataSource",
"color" : "black"
} ],
"from" : 1,
"to" : 1,
"total" : 1
}

 

in it i've got several groups present.  my test case is to import group test_1

inside the json file on my web server the the test_1 group has uid 

a98f8356-64b7-4a36-b65c-f1bbc068a9fe
 
i tried to run 
 
import_data_center_json = {
        "data-center-uid" : "64e16ac4-84c3-46b7-bd00-8d453b983c0b",
        "uid-in-data-center" : "a98f8356-64b7-4a36-b65c-f1bbc068a9fe"
}
 
when i send this via web api call to the add-data-center-object
 
get as a result 
{"code": "generic_error", "message": "Parameter [uid-in-data-center] with value [a98f8356-64b7-4a36-b65c-f1bbc068a9fe] not found."}
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events