zenoss / ZenPacks.zenoss.ZenPackLib

This is a helper library for zenpacks.
http://zenpacklib.zenoss.com/
GNU General Public License v2.0
15 stars 17 forks source link

2.0.3 m-m relations #436

Closed dougsyer closed 7 years ago

dougsyer commented 7 years ago

Im seeing issues with my m-m relations where they arent always viewable in the subcomponent panels on one or either side.

I do have some m-mrelatiobs working and o havent been able to establish a pattern or simple test case yer..

The relations all work but the paths are missing in the catalog.

Reindexing doesnt fix it so im assuming the path providers arent right.

Im going to try to find the time to be able to reproduce it in the next couple days.

Updating from 2.01 to .03 seemed to make things more consistently broken. I had similar issues in 1.x but i assumed it would go away in 2.x

Just wonderinf if there are any known non public issues out there befote i burn more time on it

dougsyer commented 7 years ago

i think maybe i figured out the pattern i will create a support ticket..

pretty sure that if you set relations between two classes that dont have the same intermediary base class then the path providers break.

in my case BaseClass1 is zenpacklib.component but BaseClass2 base is zenapacklib.hwcomponent...im not sure if that is a factor yet.

ie classes: Mydev: bases: [zenapcklib.device] BaseClass1: bases: [zenpacklib.component] BaseClass2: bases: [zenpacklib.component] Cls1: bases[BaseClass1] Cls2: bases[BaseClass1] Cls3: bases[BaseClass2]

relations: MyDev 1:MC Cls1 MyDev 1:MC Cls2 MyDev 1:MC Cls3

CLs1 M:M Cls2 # this works Cls2 M:M Cls3 # this gets a relation but the path providers are **probably broken

dougsyer commented 7 years ago

by the way i dont think its an issue with M-M im seeing the same issue with the "M" side of non-containing 1-M relations.

It was hard to spot because the objects i was working with were created in zplib 1.x originally.

i did try to just add a new device fresh with zplib 2.x but that didnt fix the issue as i suspected

dougsyer commented 7 years ago

okay i think i figured it out, has to do with components that have are subclassed from HWComponnet. i have a reproduciton of the issue in a public repo.

dougsyer commented 7 years ago

im pretty sure this was solved now in 2.06. i added a public repo to demonstrate the problem and its working now.