infobloxopen / infoblox-client

Infoblox NIOS Python WAPI Client
Apache License 2.0
142 stars 104 forks source link

AdmConProtoError: Unknown object type (record:ns) #326

Closed yidianyipie closed 2 years ago

yidianyipie commented 2 years ago

Hi Team,

I have tried to add ns record with the code below

try:
    res, isOk = objects.NsRecord.create_check_exists(self.conn, view='default', name=record_name,
                                                     address={'_struct': 'zonenameserver',
                                                                 'address': record},)
except InfobloxCannotCreateObject as e:
    logger.error(str(e))
    return "add NS record err: {e}".format(e=str(e)), False

And it shows error below


 Cannot create \'record:ns\' object(s): b\'{ "Error": "AdmConProtoError: Unknown object type (record:ns)", \\n  "code": "Client.Ibap.Proto", \\n  "text": "Unknown objec (record:ns)"\\n}\' [code 400]',
 False)

Could you please give me some advice on it ?

BR Robin

yidianyipie commented 2 years ago

hello team,

Any response?

BR Robin

sarya-infoblox commented 2 years ago

Hi @Guxing0321

We are working on a new release right now, we will look at this issue as soon as we get time.

sarya-infoblox commented 2 years ago

Hi @Guxing0321,

You are using the wrong syntax please use-

res, isOk = objects.NsRecord.create_check_exists(conn, view='default', nameserver='new_my_zone.com', addresses=[{ 'address': '10.0.0.6'}] )

Let me know if this helps.

yidianyipie commented 2 years ago

Hello @sarya-infoblox ,

Sorry for the late response, your advice is great help for me. And now the issue is resolved

BR Robin