-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
…flict. Need to rename the function so that we can have a chat command called `get devices`.
Found that we were making extraneous calls to get the DeviceGroup name when we can just iterate through the groups themselves for the devices and get the info that way.
…rules. Actually fixes #112.
So that the function can be used other places and commands I've moved the text message to be created in the chat command and the util function to just return a dictionary of data about the groups and devices in them. I've also updated the tests to account for this.
This should make it easier to work with devices/DeviceGroups by name.
…it's one "word string"
I've also gone ahead and updated the |
Can you update the screenshots in the README? |
return _device_dict | ||
|
||
|
||
def get_devicegroups_from_pano(connection: Panorama) -> dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lot of overlap with get_devices_from_pano
and get_devicegroups_from_pano`. Anyway we can just make this a singular function and pass what you want?
def get_from_pano(connection: Panorama, groups: bool = True, devices: bool = True) -> dict:
<merged logic>
return (_device_dict, _groups_dict)
Just trying to keep DRY principal in the forefront here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the device/device group output of each is different I would still most likely keep two different methods to generate each and just reference those in the get_from_pano
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffkala I've updated the methods as requested. Is that what you were thinking?
I can take some using Mattermost but the existing ones look like they're taken in Slack. I'm not sure how to go about getting dev environment setup to connect to Slack. |
I can help with getting a Slack dev environment setup. I'll reach out to you directly. |
…Panorama Also updated tests to ensure the data is still being returned as expected
Also fixed some grammatical issues
This PR includes a few things:
get-devices
.get-devices
to return Device Inventory information to the user.get-devicegroups
to return DeviceGroup information and their associated Devices.