Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extending HW class #28

Open
dougsyer opened this issue Sep 16, 2013 · 4 comments
Open

extending HW class #28

dougsyer opened this issue Sep 16, 2013 · 4 comments

Comments

@dougsyer
Copy link

This may be out of scope for this generator for now but if im adding a new hwcomponent i'll typically add it into init

DeviceHW._relations += (("DSPCards", ToManyCont(ToOne,"ZenPacks.NWN.CiscoUCSNMP.CiscoDSPCard", "hw")), )

then i'll typically"
for d in self.dmd.Devices.getSubDevices():
d.hw.buildRelations()

@eedgar
Copy link
Contributor

eedgar commented Sep 16, 2013

I just pushed a fix for this into the develop branch also. I should have a new release out tomorrow.

@eedgar
Copy link
Contributor

eedgar commented Sep 16, 2013

At the moment it might only work for Products.ZenModel.Device.Device. I will see if I can make it work for your Example Also.

@eedgar
Copy link
Contributor

eedgar commented Sep 16, 2013

Doug,
I really misread what you are trying to do. At the moment this is out of scope, but I will think about it some more. Your use case is a fairly common one, but the syntax and detection of this one might be tricky since hw and os are not created the same way as other components.

Thanks for the enhancement request.

@dougsyer
Copy link
Author

Thanks.

Its no big deal anyways for me to go back and modify the generated zenpack to set those relations on os or hw if its somerhing simple and not something inserted in the middle like a chassis in tge storagebase zenpack. Just thought id mention it. I know you can either extend hardware for the entire device class or do it at the base hw. And there reasons to do both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants