TECHZEN Zenoss User Community ARCHIVE  

Getting attribute error while trying to test component class .

Subject: Getting attribute error while trying to test component class .
Author: [Not Specified]
Posted: 2015-03-02 14:15

Executed the following error in zedmd

> from ZenPacks.community.Nutanix.ControllerVM import ControllerVM
> cvm = ControllerVM('cvm_01')
> device = find("angola-c2.eng.nutanix.com")
> device.Controller_VM._setObject(cvm.id, cvm) ###### Getting the below error here
================================================
ERROR
================================================
Traceback (most recent call last):
File "", line 1, in
AttributeError: controller_vm

=============================================

Deleted the device and re-added as well as executed the below snippet as well. Still getting the above error
device.buildRelations()
commit()



Subject: I guess, that "device"
Author: Jan Garaj
Posted: 2015-03-02 14:53

I guess, that "device" variable doesn't have attribute "Controller_VM"

Run:
> from ZenPacks.community.Nutanix.ControllerVM import ControllerVM
> cvm = ControllerVM('cvm_01')
> device = find("angola-c2.eng.nutanix.com")
> dir(device)
to list all available attributes/functions of variable "device"; maybe it's only typo and ControllerVM attribute exists there.

BTW: it's related to ZenPacks.community.Nutanix, which I'm not able to find on the internet - what is the purpose of this zenpack

Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.

DevOps stack: Docker / Kubernetes / Mesos / Zabbix / Zenoss / Grafana / Puppet / Ansible / Vagrant / Terraform / Elasticsearch



Subject: Hello,
Author: [Not Specified]
Posted: 2015-03-03 01:09

Hello,

Thanks for replying back. I did check on dir(device) . Could not find the relationship there . ZenPacks.community.Nutanix is not yet published . I am just doing a small proof of concept by creating the ZenPack.

It will help me if you have any pointers that could help me resolve the issue . Let me know if you need any further information



Subject: Adding further , I am just
Author: [Not Specified]
Posted: 2015-03-03 01:17

Adding further , I am just following the developer guide to do the proof of concept. I am specifically facing the issue in the component modelling chapter . The link is given below : http://zenosslabs.readthedocs.org/en/latest/zenpack_development/monitori...

In the guide also it is mentioned this error will occur but should go away once the device is deleted and added back. In my case the error still persists even after re-adding . Not sure where I am going wrong. Let me know if you want to have a look at my python files



Subject: If attribute is missing,
Author: Jan Garaj
Posted: 2015-03-03 06:06

If attribute is missing, something is wrong - probably code. If code is not published, then only some sibylline developer can help you :-)

Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.

DevOps stack: Docker / Kubernetes / Mesos / Zabbix / Zenoss / Grafana / Puppet / Ansible / Vagrant / Terraform / Elasticsearch



Subject: Hello
Author: [Not Specified]
Posted: 2015-03-05 12:57

Hello

I have published relevant portion of my code through the following post

http://www.zenoss.org/forum/4301



< Previous
Help Needed in creating relationships for a Zenpack
  Next
windows shell custom command, someone has this working ?
>