Create shared address object

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

Create shared address object

L1 Bithead

I'm using pandevice to create address object, and am able to create address object for specific device group but not a "Shared" object.

 

pano = panorama.Panorama(device_name, login_id, pwd) 
panogrp = panorama.DeviceGroup('Group1')
pano.add(panogrp)

 

# Read input file
addrObj_df = pd.read_csv(file)

for index, row in addrObj_df.iterrows():
passed_obj_name = row['name']
passed_obj_value = row['value']
passed_obj_type = row['type']
passed_obj_description = row['description']

address_object = objects.AddressObject(name=passed_obj_name, value=passed_obj_value, type=passed_obj_type, description=passed_obj_description)
panogrp.add(address_object)
address_object.create()

 

When I change 'Group1' in panogrp = panorama.DeviceGroup('Shared') to 'Shared', the following error  message received :

PanDeviceXapiError:  Shared 'Shared' is invalid. Reserved keyword (Shared) used for device group name

 

Any help is appreciated. Thank you.

 

2 REPLIES 2

L5 Sessionator

Adding the address object as a child of the Panorama object itself is how you add things to "shared".

 

from panos.panorama import Panorama
from panos.objects import AddressObject

pano = Panorama(host, user, passwd)
obj = AddressObject("dmz network", "10.50.75.0/24")

pano.add(obj)

obj.create()

Thank you for helping to resolve, very much appreciated.

  • 2796 Views
  • 2 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!