Giter Club home page Giter Club logo

zenpacks.zenoss.zenpacklib's Introduction

zenpacks.zenoss.zenpacklib's People

Contributors

brianbruggeman avatar byshovets avatar cajoz avatar cluther avatar dbouchillon avatar dekapito avatar eedgar avatar eimajenthat avatar itshane avatar j053ph4 avatar jeff-powell avatar joshw avatar jpeacock-zenoss avatar jscausey avatar kevinjcash avatar lundybernard avatar merteg avatar mihnatenko avatar odubrovyk avatar ostyhar avatar otrach avatar pcarinhas avatar rvykunta avatar sockterrier avatar ssoleg avatar ssvsergeyev avatar stevepc avatar stmcginnis avatar yichi-lu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zenpacks.zenoss.zenpacklib's Issues

Default values for attributes

I think that the "default" value should be initialized as follows by default:

String: empty string ""
Int: 0
Float: 0.0

I know in old style zenpack development you would never declare a property as string, int, float and initialize it as None..if you look at any older zenpacks that isnt done.. If you set the default as None you are also putting more reliance on your api layer and javascript to interpret None correctly...which will cause issues. Ive seen in zenoss before doing inspects in my javascript..

It seems a waste for me to manually have to set the default value on every string int and float field.

The advantage to None i think is that in development you can change types without as may side effects.

As a correlary to this..the apply data map should really check types. I know thats kind of an anathema having types but you end up having to do do type checking or conversion anyways as soon as you do anyhing involving calculations..better imo to check it on the way in imo..

Inknow its sometimes safer to set everything as string but if you have users editing things that are intended to be ints then you either have to set it as int and have the xtype set to int or you have to write type checking or conversion code sometimes in several places..

zenpacklib for UI customization

I created zenpacks using zenpacklib. All was well.
I moved to device UI customization and wanted to introduce new fields in the device overview panel of my device page.

I did some research and found out that

  1. for= attribute on the configure.zcml is the key for adding Js scope
  2. for="Products.ZenModel.Device.Device" make this global
  3. for="..Ourdevice.ourdivice" limits the customization only to our device

Since we are using zenpacklib there is no explicit Ourdevice.py -> Class Ourdevice(Device).
This is part of the init.py file of zenpack, which zenpacklib uses for configuration building.
But If I still continue to point the device (both label match and class match) to the configuration within init.py
I get the following error while reinstalling zenpack.
ConfigurationExecutionError: <type 'exceptions.AttributeError'>: 'module' object has no attribute 'module'

Now is UI customization possible while using zenpacklibs?
Is there any reference samples/docs for helping us out?
I am not sure whether the reported issue is a bug with zenpacklib or my usage.
Any help much appreciated.

Permissioned context-sensitive menu items on components

Great stuff!!

Id love to be able to add permissioned context senstive menu items on components where the selection model can pass the device AND component context back with a value set by the user. The router and facade code is not a problem for us its the extjs that stops us .its no big deal at the device level but the component level .. No real examples other than the core code. Id use menus with buttons all the time to allow prople to say ..,set a per disk threshold etc.

For the permissions i have custom roles with (forget the permission names) usef to allow people to do basic things on the devices they own but they cant set properties in the subpanels because the default property permissions are manage for property setting. The details sub panels are too buried anyways.

Feel free to cose but snippets to do this would be used by us alot.

feature request: is it possible to not load the whole yaml every time a daemon starts?

is there a way that you can set it so that the whole yaml file doesnt load during the zenpack import? I dont think alot of it needs to be read every time we initialize a daemon since alot of it just needs to be imported on zenpack install afaik.

the reason im asking for this is that with a large yaml file it takes a long time to do test runs...also the faster our daemons start the easier it is to keep zenoss up to date as patching is fast(with 4.2) at least.

zenpacklib does not work in zenoss 5

There appears to be an issue with relationships using Zenoss 5.0.6

I exported the working wunderground example zenpack from 4.2.5 and recieve the following error from zenoss 5

2015-10-20 21:58:42,881 INFO zen.ZenHub: Worker (5385) reports 2015-10-20 21:58:42,880 WARNING zen.ApplyDataMap: no relationship:wundergroundLocations found on:wunderground.com (<class 'Products.ZenModel.Device.Device'> )

https://github.com/JayCeeJr/zenpack.training.wunderground

dynamicview additional views

i added a dynamicview view in zenpacklib that I intend to display at the device level. I added the javascript panel like this (Ive tried several filters but the current filter is All. and i left out some of the javascript obviously)

The panel is there and I can see dynamic view is trying to render something...i see the controls but no flash image.

Zenoss.nav.appendTo('Device', [{
id: 'test_view',
text: _t('MyTestView'),
xtype: 'dynamicview',
relationshipFilter: 'All',
viewName: 'test_view'
}]);

I cant get the new view to render. I saw the examples in the openstack zenpack and played around with the views/filters to be similar the ones in that zenpack. i read the docs within the zenpacklib.py file as well.

I did restart zenjserver...is there a trick im missing? do I need to just create a view the traditional way to add custom views? I dont see anything in the logs tried to run zenjserver in debug but that doesnt give me anything.

My views in service_view work fine at the device level.

I need to create a couple of other views because there are a ton of component types and one big view a the device level is slow and hard to understand.

in this case, im not worried about exporting anything to impact.

Path reporter in docs

Ive done custom path reporters the old way but the nested list parameters specified in the documentation isnt clear to me. I looked at openstack zp but im not familar enough with the architecture to interpret the yaml into a practical example to use. In my case i have component a 1-mc component b, component b 1-mc component c, and i want to be able to see component c totals in the grid of component a. In the past i have inly done the path reporters across non containing relationships.

Can you do path reporters on nested 1-Mc rels safely?

simple use case problem -> grid display of MC->1 entity

I have a really simple use case that Im struggling with. I know how to solve the problem with the old zenpack development methods but not sure what Im doing wrong with this.

I'll try to illustrate the situation:

Relations:

Device ->1-MC -> BIGCOMPONENT 1->MC ->LITTLECOMPONENT

I want to display a link to the parent object in the javascript grids for LITTLECOMPONET

so for example on the Javascript grid for LITTLE COMPONENT, I want to see this:

event status icon -> LITTLECOMPONENT TITLE -> LINK TO BIGCOMPONENT -> locking, monitored etc..

In my zenpack, i know the relationships are fine, they model fine, they pass schema tests, and I can see the link on LITTLECOMPONENT to BIGCOMPONENT in the details panel,

I cant even get the columns to show up to display big component in the grid.. strangely, i dont see errors either in javascript doing an inspect which is typically what I see when I mess up something.

Ive tried several things using the API settings etc etc. in the old world for a 1->M cont link id basically just tweak info/interface api and then use a entity link renderer to have it display in the grid...I could go on for several paragraphs with what Ive tried.. but I feel like this is probably very easy to do and Im missing someting. again these are 1->Mc relationships so I didnt dive into custom path reporters etc.. im just trying to link to a component one relationship up.

is there a simple solution for this that I'm not seeing? I reviewed the openstack yaml and since I dont have openstack and thats a very advanced zenpack, it hard to find an example. Ive gone through the docs pretty extensively..

Possible missing line in zenpack.yaml "Configure Monitoring Templates" section

I believe the zenpack.yaml is missling a line, the name of the template. Shouldn't it be:

device_classes:
 /WeatherUnderground:
   templates:
     Location:
       description: Location weather monitoring using the Weather Underground API.
       targetPythonClass: ZenPacks.training.WeatherUnderground.WundergroundLocation

       datasources:
         alerts:
           type: Python
           plugin_classname: ZenPacks.training.WeatherUnderground.dsplugins.Alerts
           cycletime: "600"

This would also apply to the next page "datasource-plugin-datapoints"

problems setting M-M relations

I have a ZP where im setting M:M relations.

What Ive found is if you have relations like this:

MyCustomDevice 1:M Component1
MyCustomDevice 1:M Component2
Component1 M:M Component2

and you have duplicate ids between components, you can have a situation where the search in the returns the incorrect component so you get a traceback like this:

ZenSchemaError: ('component1 restricted to class Component1. Default is class Component2', None)

In this case I have a component with an id named "Default" in two different classes. that seems be causing the issue, there is no constraint with the device types im working with to have a unique id name for every component and often you will fine multiple components named "Default" along with other duplicate component names..

I know i can modify the ids with a tag to make them unique but that causes a variety of problems in my polling datasources/plugins.

it appears that in zenpacklib.py, this search will only return one matching id? I tried the same query against the built in componentBase and got the same result, only one object...only in componentBAse I could also specify a meta type..

def setIdsInRelationship(self, relationship, ids):
"""Update ToMany relationship given relationship and ids."""
new_ids = set(ids)
current_ids = set(o.id for o in relationship.objectValuesGen())
changed_ids = new_ids.symmetric_difference(current_ids)

    query = Or(*[Eq('id', x) for x in changed_ids])

    obj_map = {}
    for result in self.device().search('ComponentBase', query):
        obj_map[result.id] = result.getObject()

Suggestion for documentation

Some things ive spent alot of time when working on zenpacks. At risk of embarrassing myself here.

how to call the methods updating non containing relationships in a modeller:

  • not alot of helpful errors sometimes when you are feeling this out when writing a modeler so for me at least if would of helped to know exactly what parameters you need to call these.
  • for example, I think the methods are named differently named now but I got stuck a couple of times with having to pass in the full class ie mycomponent.mycomponent.ZenPacks..
  • how to efficiently get the lists you need to update the relationships on m-1 ...i think this is taken care of now with the new lib so you dont need to worry about it as much

path reporters

I got them running several different ways now but it was trial and error and I was a bit worried about the efficiency of the code. Some of the styles ie putting them with the object, adding them as a separate file, threw me off some. The logic could use some explaining...its probably baked in now mostly. Some basic troubleshooting documentation would help, ie I learned to check in the browser and the catalog to figure out what Ive done wrong.

the api for dynamic view.

  • i had to do it with zenstorage base which made it harder since there was some override trickery involved. I gave up after a while since I wanted to try it fresh on another zenpack.

list schema support

i have a couple of zenpacks that use lists. I'm ot sure if I should be using text lines or something..

i noticed there is no list schema support?

schema_map = {
'boolean': schema.Bool,
'int': schema.Int,
'float': schema.Float,
'lines': schema.Text,
'string': schema.TextLine,
'password': schema.Password,
'entity': schema.Entity
}

Datapoint aliases

I've been trying to assign aliases to a datapoint according to the documentation.

According to the documentation, the aliases property type is defined as:

Type: map<name, formula>

However after trying so many different combinations I just cannot set the alias properly, and keep getting this error from the linter:

zenpack.yaml:134:22: expected a scalar node, but found mapping

Which is strange since the documentation explicitly states map as the property type.

Would really appreciate if someone can provide a valid example on how to set an alias (or many aliases) with correct name and formula.

documentation request -> javascript order

love the short_label setting...it has made adjusting the grid for me much much easier...

one thing that would be helpful however is a better understanding of how the orders in the properties vs the orders in the relationship overrides interact. through trial an error i have the fields in the correct order now but its really just guesswork and id rather understand how the ordering is working.

so for example if I have this:

widget:
properties:
myproperty1: {}
order: 31

relations:
widgetdevice:
order 3.1

in this case, what will come first on the grid?

mostly i want to make sure that things are working as expected and im not getting lucky by having the order set correctly and find it broken on future updates.

Feature request ipinterface support

I need to be able to subclass ipinterface in zenpacks to change the parent relation.

I have several situations that are similar to the implementation in the cisco enterprise zenpack where i need to preserve the ip address glue code and monkeypatches made to ip interface but change the relations to the base ipinterface class.

In most of the higher end zenpacks i have done this the "old way". I could add an ipinterface relation etc etc but that gets ugly quick with ping and status and layer 2/3 and whatnot..

Maybe an is_interface switch in the yaml?

register with zencatalogscan?

I hate to leave a circular issue request here but we have come to really rely on the zenoss toolkit. It would be great if there was some way to register your custom indexes so that they can be automatically picked up by zencatalogscan..

Most of the ZenPacks with catalog customization re pretty critical and usually some of the most complex to support(ie the vendors monitoring apis have alot of bugs and its hard to get to root cause ina timely fashion). I dont think i can long term keep up with manual requests to check indexes.

Please see this ticket for a discussion regarding updating the toolbox for new checks.

https://github.com/zenoss/zenoss.toolbox/issues/35

install w/zenpacklib

i had an install issue with an ent zenpack today, i created a parature ticket for it. but one thing I noticed when installing the ZenPack was that I think it got to the point where it was doing some work on the relations / catalogs and it went on forever. Im not sure if you can do this but it would be great if you could see that progress was being made when rebuilding/removing relations or doing indexing. I think perhaps it got stuck in zenmigrate which im assuming isnt really a zenpacklib thing but just a suggestion. When you have alot of objects waiting with little info can be a hair raising experience.

eventclass/eventclass instance

I saw eric had a branch that added event class/event class instance support. that would be handy since im always forgetting to export the zp etc every time i add one of these..

not sure if you guys are going to add this to the main branch?

removal method for non containing relations

I believe if you pass None to set_{relationshipname} it will never actually remove a relation, it just changes it.

I have a situation where i need track when relation are no longer there. i will make a custom method for now but im assuming there are cases out there where you may want to remove a relation rather than change it.

doug

catalog question

when you set the scope of a catalog to be global should you see the catalog object at the device level and dmd.Devices level? Also, Im assuming ComponentBase is a catalog that will be there at the device level for all zplib devices? does that ComponentBase Catalog serve a function?

Multiple ZenPacks affecting same device class

Hello

I am currently running into an issue where I install the OpenStack Infrastructure ZenPack, which consequently creates the /Server/SSH/Linux/NovaHost device class. The ZenPack also assigns some modeler plugins to this device class.

The problem is, I am developing a new ZenPack using zenpacklib which aims to add some modeler plugins to this device class. However, when I specify these new modeler plugins in my zenpack.yaml file for this device class, all the previous modeler plugins (and possibly other configurations?) are replaced by the ones from my new ZenPack.

Is there any way around this problem so that the new modeler plugins are added to the list of existing plugins instead of replacing them? I could not find anything regarding this in the zenpacklib documentation.

Help is greatly appreciated...

Unit test for relations

Ive looked for examples and ive seen examples for testing relations after modelling but id like have a set of tests that make sure relations are correct before i start working on modelling. I know how to test the instantiation of a class, ideally though i instantiate the class and hook up the relations In tests before modelling.

strange getter behavior

if i add a getter to a class (ive been using @Property to do it).

and if there is a problem with the getter, say an AttributeError gets raised.

then the getter silently fails. i dont get a log event, it actually looks like the method doesnt exist at all. I havent gotten deeper than this in terms of trying to figure out why this is happening.

to illustrate I think this will reproduce it:

from . import schema
import logging
log = logging.getLogger('zen.test')

'
class MyComponent(schema.MyComponent):
""" i do stuff
"""
@Property
def foo(self):
raise Exception('nutz')
@Property
def bar(self):
return self.im_gonna_fail'

in dmd, r being a variable pointing to an instantiated instance of MyComponent :

r.bar
Traceback (most recent call last):
File "", line 1, in
AttributeError: bar
r.foo()
Traceback (most recent call last):
File "", line 1, in
File "/home/zenoss/ZenPacks.NWN.CM/ZenPacks/NWN/CM/CMOSComponent.py", line 14, in foo
raise Exception('nutz')
Exception: nutz
r.bar()
Traceback (most recent call last):
File "", line 1, in
AttributeError: bar

boolean grid display + renderer + editable = True

Im trying to set a boolean value to render as a checkbox in the grid but also have it editable. This worked for me in the old style zenpack development but i cant get it to work with zplib.
by default it looks like the boolean renders as true/false in the grid so I just added a renderer (see below) ..the build in one.

when I do that the javascript grid renders as a checkbox but i cant edit it in the details panel. in fact, the label for the field dissapears but i can see the checkbox.

unreg_alert:
label: UnReg Alert
type: boolean
default: false
editable: true
grid_display: true
renderer: Zenoss.render.checkbox

old style id just do this and I could edit the property and see it in the grid.

object.py:
{'id': 'tunnel_monitor', 'type': 'boolean'},
in the api:
tunnel_monitor = schema.Bool(title=_t(u'Monitor for tunnel down alerts'), alwaysEditable=True)
in the javascript:
id: 'tunnel_monitor',
dataIndex: 'tunnel_monitor',
header: _t('Alert'),
width: 60,
renderer: Zenoss.render.checkbox,
sortable: true,

checkbox1
checkbox2

When things don't, where to go for help

Made my first attempt at zenpacklib to create a new device & component following tutorial examples. No errors aren't being thrown, but components never show. So would be nice to have a documentation page to cover more detailed troubleshooting / debugging / where to get help. Raising this question to my account Rep, they suggested opening an issue here.

datasource inheritance Calculated Datasource with Defaults

I'm having an issue where when i implement yaml like you see below, everything sets correctly except the following fields:

targetmethod is set to getElement
targetDataSource is set to ''

other DEFAULTS in templates seem to be working okay at least for graphs i can set the default graph widths to 1000 across all graphs in a datasource. but that obviously isn't the template spec...
I've deleted the templates completely to make sure it wasn't just some old template i was picking up...

I have alot of calculated data sources and the yaml gets very repetitive with the aggregating data source in the yaml especially as im rolling up multiple levels of stats.
here is what im doing, generically..

datasources:
DEFAULTS:
type: Datapoint Aggregator
targetMethod: someComponentRelation
targetDataSource: my_datasource
DS1:
targetDataPoint: MyDataPoint
datapoints:
MyDataPoint:
operation: sum
DS2:
targetDataPoint: MyDataPoint2
datapoints:
MyDataPoint2:
operation: sum
.

Ability to set default component display panel

On some container classes where i'm not really monitoring stats, it would be very nice to default the subpanel to the details sub panel or a custom subpanel listing sub-components rather than graphs. I haven't figured out how to do this via zenpack yet...and its probably only useful on more complicated zenpacks but it would be nice to be able to set the default subpanel.

it would be nice actually to disable the graphs all together in this case so users know there isnt something any stats ..

by the way, it wont hurt my feelings if you need to close these by the way unless you need them / care to track..

zenpacklib DEFAULTS behavior

if i set yaml like this:

classes:

DEFAULTS:
properties:
description:
label: Description
label_width: 200

then later if I add more properties to a component:

RegisteredComponent:
base: [zenpacklib.HardwareComponent]
properties:
perfmon_id:
label: blah

what I am seeing is that i can see the properties set in the DEFAULTS on the details panel but they dont stay on the javascript grid. so id see perfmon_id in the grid and description only in the details panel.

I may be making a mistake in the way im using defaults to set properties, not sure ie maybe you can only really use defaults for scalar values and not lists or something for gui things.

warnings on grid size showing up unexpectedly

Just to be clear, I dont need help figuring out the warning message I mention below. im opening this issue to check on the behavior of the logging in zenapacklib, not for the error itself..

we have a several zenpack development effort underway using zenpacklib.

one of the in progress zenpacks has the object model pretty much completed with relations but we haven't gone back to do the finishing touches on the grid/gui yet.

what Im seeing is that every time i go into dmd, i get this showing up in stdout. I also see this in stdout every time i we get a traceback when we try to say restart zenhub. This isnt causing a traceback...the traceback is due to something else I just see this message when I load a script, when i run dmd, when i make a mistake and cause a traceback when reloading zenpack on the dev system...

2015-06-05 13:11:20 WARNING zen.zenpacklib ZenPacks.NWN.CM: CMComponentBase custom columns exceed 750 pixels (1007)
....this repeats per component....

zenpack lib relations mapping for non containing relations

Let me start by stating that zenpacklib rocks!!
I was able to accomplish linking container relations and get them in the UI way easily.
We specify relations in the yaml spec. I can see that the parent relation 'name' is easily identified through label. But what is the corresponding relation from the child?
For ex, [COMP1]++-[COMP2]
In the above, if COMP1 'label' is 'Comp1', then the relation is 'comp1s'. (small first letter and plural)
But what is the equivalent from Comp2 to get to Comp1?

Secondly, I am trying to model non containing relations between components.
Say,
[ROOT]++-[Comp1] /* This is good containing relation, parent child relations_/
[ROOT]++-[Comp2] /_ This is good containing relation, parent child relations /
[Comp1]
-.-[Comp2]. / HOW?? To many non containing relations between components */

Now, how can I establish the relation between them? Any references please.

Thanks, your pointers are much appreciated.

Feature request yaml export?

I find particularly right after development when a hit a bunch of real world devices i end up modifying templates in my production instance because it can reach all the various devices i need to get to I then end up manually mosidying the templates in my dev instance...then need to reinstall preproduction.

We rarely install zenpacks on the production side in dev mode due to the high risk of having development artifacts in the zenpack.

I see here i can do the templates originally in YAML and that is great..but in practice i need to be able to go in the opposite direction ie templates ->yaml. Even in development its easier to make mass changes in yaml but tweak colors, groupings, etc in the gui.

Keeping the yaml in sync at the same time helps when say i want to have a consistent label for the same stat across different components.

What i mean is that i often realize at thr end of development that i have a stat like packets per second labeled as "packet throughput" for one compoment and labeled "throughput" on another component or i have the unit inconsistencied like PPS in one graph and packets/second on another. Those changes Are easier made via yaml but id like to get the most recent version of the templates out of dmd first.

It also would help when Im having someone QA before we go production because its easier to spot mistakes in a serialized format. Nothing adds to the tedium of all the template wrangling like realizing i have to change a counter to a guage after we have live rrds deployed..

I know of a few scripts to get things out and a few we have created but is rather use the toolkit.

My appologies if there is a standard way to do this now and im missing it.

strange condition causing unbounded hub memory use

I have a ticket open for this but i had some difficulty installing a zenpack based on zenpacklib. the zenpack needs a full reinstall but there is something wierd happening as a side effect that has the potential for showing up in other cases.

The zenpack works fine in my development environment but in prod it has this strange issue.

I have a situation where the component catalogs @ device didnt get created. i manually created them to see if the condition would go away but it hasnt...(Im scheduing a full reinstall of the zp in any event) but still im seeing an issue where:

  1. I model a device
  2. I can see the OM/RM being processed, i can see the reactor trying to process the RM.
  3. Running debug on hub shows no errors (v10).
  4. Eventually the collector times out but...
  5. the hub worker keeps eating all memory until i kill it manually, if I dont we get an OOM condition.

Again, this is a fringe case where we had install issues and support recommends reinstall but Im assuming there should be some logging going on and it may be something that can happen in other circumstances.

another strange thing is that Im seeing this catalog created which I assume you are referencing in the most recent changes. this is under the individual device in "parallel" with the normal component search: ComponentBaseSearch (ComponentBaseSearch)

feel free to close this issue since the official support recommendation is to reinstall but if you want me to get more diagnostic information i'll make the time to do so.

question about mix-in classes

what is the best way to handle mix-in classes?

do I do this:

  1. add the mix in class into zenpacklib with no attributes etc.
  2. create file for class with schema.classname as base
  3. add the mixin class as the second base in each model class?

the use case is that I am adding a few methods to a subset of the component classes in a zenpack.

zenpacklib and custom functions on component/device classes

I have a chained relation established between components.
I figured out the property attribute for displaying chains are through 'schema.Entity'.
I was successfully able to create this property within components.
But I need some additional functions defined within component/device classes to make it work.
How can I do this when the zenpacklib spec is written?
If not, how else to initialize this relation successfully.

For ex. comp1 and comp2 are component defined part of spec.
comp1 and comp2 has a 'entity' property defined.
comp1 will have a link to comp2 and comp2 will have a link to comp1.
For establishing this link, there are usually functions defined to help with this purpose.
As an example, like below.
def comp1_to_comp2_item(): /* within comp1 class */
return self._object().comp2()

def comp2_to_comp1_item(): /* within comp2 class */
return self._object().comp1()

How to add these additional functions when components are specified as spec for zenpacklib?

https://github.com/zenoss/ZenPacks.zenoss.CloudStack
I am looking at cloudstack zenpack that you had written. I am trying to bring similar functionality to my zenpack but mine is build using zenpacklib. Can you tell me the same functionality can be got using zenpacklib too? My question precisely is how to introduce those additional functions within each devices and components that helps with building the relation, part of the spec?

documentation issue on RRDtypes

I was able to use COUNTER...assuming this is a documentation error?

rrdtype
Description: Type of datapoint. Must be GAUGE or DERIVE.
Required: No
Type: string (must be either GAUGE or DERIVE)
Default Value: GAUGE

strange results, just me?

I have a zenpack where i tried to set a relation like this(probably typos here but i manually created this example)

class_relationships:
Cluster 1:MC RegServer
Cluster 1:MC RegisteringThing1
Cluster 1:MC RegisteringThing2
RegServer 1:M RegisteringComponent

Class Cluster:
base: [zenpacklib.device]

Class RegServer:
base[zenpacklib.Component]
filter display: false

Class RegisteringComponent::
base: [zenpacklib.Component]

Class RegisteringThing1:
base: [RegisteringComponent]

Class RegisteringThing2:
base: [RegisteringComponent]

It works, i can model against it, components are there..

When I do a global search on components, i see the components but if i try to click on the global search it doesnt take me to the component, i get a zope/cannot find component screen. I compared the URLS and they seem correct.

What Im thinking is this is a path reporting issue, where I either need to add a relation per registering thingee or I need to muck with path reporting. In the component panel dropdowns though I see the components linked together, and i see the correct counts on the grid.

what im wondering is, is there a problem with zenpacklib where global search breaks if you inherit relations from a superclass like this? im probably going to try to explicitly hard code the relations per regiteringthing but seems like I shouldnt have to because it almost works...and at first blush since i see the dropdown lists it doesnt look like a path reporting issue...

feature-request, classmethod returning om/rm

I dont know about you all but i always struggle trying to get the om/rm syntax correct in my modelers.

You may have thought of this already but it may make sense to include a class method on the base objects, something like this, to make it easier to create your relmaps:

@classmethod
def getRM(self, oms):
return RelationshipMap(modname = self.module,
relname = 'add your relname here',
objmaps = oms)

Feature request please add title to the details grid

Please add the device title as a default detail field. this may seem redundant but from a usability perspective I didnt realize how much I use the details fields to cut/paste into zenoss or my ssh terminal etc. cant easily cut/paste from the grid.

(also imo the counts for objects should be on the right side of the details and not the left...at least thats how my brain works...i try to put the most used information in the details in the top left of the details panel so people are more likely to find what they are looking for)

Bug: relationships_from_yuml bombs on blank lines

Problematic Behavior:

If relationships_from_yuml encounters a blank line, it will log an error with message "parse error in relationships_from_yuml at [...]".

Expected Behavior:

Ignores blank lines and lines composed entirely of whitespace.

Proposed Solution:

Change regex for comments to `r'^\s_(?://._)?$'.

relationships_from_yuml still exists

The relationships_from_yuml function existed before to parse a YUML file defining relationships. YUML is not still used, so this function should be removed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.