Open dsun-edwards opened 8 months ago
I agree - this is very confusing. A device group is not a device as such, hence it can't have child "devices" and the method can't be used in sensible manner. However, devices as well as device groups are created through the Inventory API which does not prevent you from doing these things.
As described here, the Python API aims to be close to the REST API which no magic happening in the background. In short: as the REST API allows this, so does the Python API.
But I do get the point - I'll take this and will think of a nice way to make this clearer to the users.
Method .add_child_device() should be removed from DeviceGroup, as DeviceGroup uses .add_child_asset() to associate a device with the group. Using DeviceGroup.add_child_device() for this purpose is very confusing and the results seems also incorrect as stated in below issue 1.
Issue 1.
Issue 2.