VMware Cloud Community
laullon
VMware Employee
VMware Employee
Jump to solution

HQU Plugin - byPlugin

I've wrote a very simple HQPlugin, 'Hello world' , please see attached .tgz file and screenshot.

If HQUPligin is attached to system plugin (byPlugin:'system'), it does works well, but, if it's attached to other plugin (byPlugin:'postgresql'), it doesn't work...

I saw 'byPlugin' option in hq.war/hqu/live_exec/Plugin.groovy file.

Do I need to do something more to attach the HQUPlugin to another pluging ?
0 Kudos
1 Solution

Accepted Solutions
jtravis_hyperic
Hot Shot
Hot Shot
Jump to solution

German,

I've updated the addView() method to work for general resource types.

Simply use:

addView(description: 'FileTail',
attachType: 'resource',
resourceType: ['FileServer File', 'Script'],
controller: FiewController,
action: 'index')

The resourceType argument is what you want.

This is available in HEAD, the 3.2 branch, and will be contained within next week's 3.2.2 release.

Once you have this, you can use 'getViewedResource()' from your controller to get the resource that the user is looking at.

-- Jon

View solution in original post

0 Kudos
4 Replies
admin
Immortal
Immortal
Jump to solution

Hey German,

I'm interested in trying out your plugin, and will give you some
feedback later today.

In the meantime, the easy-attachment code (byPlugin) only really
works well for Platforms. This code lives in HQUPlugin.groovy.

It is possible to attach to any resource (plast, server, service), so
if you'd like more complex attachments, I suggest you take a look at
HQUPlugin.groovy and rip out the code you need (or better, provide a
patch)

-- Jon



On Mar 12, 2008, at 10:28 AM, German Laullon wrote:

> I've wrote a very simple HQPlugin, 'Hello world' , please see
> attached .tgz file and screenshot.
>
> If HQUPligin is attached to system plugin (byPlugin:'system'), it
> does works well, but, if it's attached to other plugin
> (byPlugin:'postgresql'), it doesn't work...
>
> I saw 'byPlugin' option in hq.war/hqu/live_exec/Plugin.groovy file.
>
> Do I need to do something more to attach the HQUPlugin to another
> pluging ?


0 Kudos
jtravis_hyperic
Hot Shot
Hot Shot
Jump to solution

German,

I've updated the addView() method to work for general resource types.

Simply use:

addView(description: 'FileTail',
attachType: 'resource',
resourceType: ['FileServer File', 'Script'],
controller: FiewController,
action: 'index')

The resourceType argument is what you want.

This is available in HEAD, the 3.2 branch, and will be contained within next week's 3.2.2 release.

Once you have this, you can use 'getViewedResource()' from your controller to get the resource that the user is looking at.

-- Jon
0 Kudos
laullon
VMware Employee
VMware Employee
Jump to solution


Ok, Thank you....

I
'
ll try it tomorrow...

On Tue, Mar 18, 2008 at 11:15 PM, Trav <jtravis@hyperic.com> wrote:

German,



I
'
ve updated the addView() method to work for general resource types.



Simply use:



      addView(description:  
'
FileTail
'
,

               attachType:  
'
resource
'
,

               resourceType: [
'
FileServer File
'
,
'
Script
'
],

               controller:   FiewController,

               action:      
'
index
'
)



The resourceType argument is what you want.



This is available in HEAD, the 3.2 branch, and will be contained within next week
'
s 3.2.2 release.



Once you have this, you can use
'
getViewedResource()
'
from your controller to get the resource that the user is looking at.



-- Jon




--
Germán Laullón
Web: http://www.laullon.com/
PhotBlog: http://www.laullon.com/blog

Flickr: http://www.flickr.com/photos/laullon/

0 Kudos
laullon
VMware Employee
VMware Employee
Jump to solution

Perfect, now works fine...

Thank you.
0 Kudos