Skip to content
Browse files

Xen Virtual Machine Report 1.0

git-svn-id: http://zenpacks.zenoss.org/svn/zenpacks@623 db08cffe-75b9-45d1-af1a-46ad9ef135f6
  • Loading branch information...
0 parents commit c972da33ae6b8bec343139cac55d30d2cb6b8306 Matt Ray committed
16 COPYRIGHT.txt
@@ -0,0 +1,16 @@
+All files in this directory and below are:
+
+Copyright (c) 2010 Zenoss, Inc. All rights reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1 MANIFEST.in
@@ -0,0 +1 @@
+graft ZenPacks
1 ZenPacks/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
8 ZenPacks/puzzle/VMReportXen/__init__.py
@@ -0,0 +1,8 @@
+
+import Globals
+import os.path
+
+skinsDir = os.path.join(os.path.dirname(__file__), 'skins')
+from Products.CMFCore.DirectoryView import registerDirectory
+if os.path.isdir(skinsDir):
+ registerDirectory(skinsDir, globals())
2 ZenPacks/puzzle/VMReportXen/datasources/__init__.py
@@ -0,0 +1,2 @@
+# __init__.py
+
1 ZenPacks/puzzle/VMReportXen/lib/__init__.py
@@ -0,0 +1 @@
+# __init__.py
1 ZenPacks/puzzle/VMReportXen/migrate/__init__.py
@@ -0,0 +1 @@
+# __init__.py
0 ZenPacks/puzzle/VMReportXen/modeler/__init__.py
No changes.
0 ZenPacks/puzzle/VMReportXen/modeler/plugins/__init__.py
No changes.
8 ZenPacks/puzzle/VMReportXen/objects/objects.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<objects>
+<!-- ('', 'zport', 'dmd', 'Reports', 'Device Reports') -->
+<object id='/zport/dmd/Reports/Device Reports' module='Products.ZenModel.DeviceReportClass' class='DeviceReportClass'>
+<object id='VMReport' module='Products.ZenModel.Report' class='Report'>
+</object>
+</object>
+</objects>
61 ZenPacks/puzzle/VMReportXen/reports/Device Reports/VMReport.rpt
@@ -0,0 +1,61 @@
+<tal:block tal:define="
+ objectsTemp1 python:[ d.guestDevices() for d in getattr(here.dmd.Devices.Server, 'Virtual Machine Host').Xen.getSubDevices() if d.hasObject('guestDevices') and len(d.guestDevices()) != 0 ];
+ objects python:[];
+ objectsTemp2 python:[ objects.extend(v) for v in objectsTemp1 ];
+ objects python: (hasattr(request, 'doExport') and list(objects)) or objects;
+ tableName string: vmList;
+ batch python:here.ZenTableManager.getBatch(tableName,objects,
+ sortedHeader='displayName');
+ exportFields python:[('displayName','Name'),('memory','Memory'),('operStatus','Status')]
+">
+<tal:block metal:use-macro="here/reportMacros/macros/exportableReport">
+<tal:block metal:fill-slot="report">
+ <tal:block metal:use-macro="here/templates/macros/page1">
+ <tal:block metal:fill-slot="breadCrumbPane">
+ <span metal:use-macro="here/miscmacros/macros/reportBreadCrumbsList"/>
+ </tal:block>
+ <tal:block metal:fill-slot="contentPane">
+ <form method="POST" tal:attributes="action request/URL;"
+ tal:define="tabletitle string: Virtual Machine List;
+ showfilterbox python:True;
+ tblcolspan string:3">
+ <tal:block metal:use-macro="here/zenuimacros/macros/zentable">
+ <tal:block metal:fill-slot="zentablecontents">
+<tr>
+ <th tal:replace="structure python:here.ZenTableManager.getTableHeader(
+ tableName,'displayName','Name','cmp')"/>
+ <th tal:replace="structure python:here.ZenTableManager.getTableHeader(
+ tableName,'memory','Memory (MB)','cmp')"/>
+ <th tal:replace="structure python:here.ZenTableManager.getTableHeader(
+ tableName,'getParentDeviceName','VM Host','cmp')"/>
+</tr>
+ <tal:block tal:repeat="r batch">
+ <tr tal:define="odd repeat/r/odd; link r/managedDeviceLink; hostLink r/getParentDeviceUrl"
+ tal:attributes="class python:test(odd,'odd','even')">
+ <td class="tablevalues">
+ <span tal:content="structure r/urlLink"/>
+ <span tal:condition="link" tal:omit-tag>
+ (<span tal:replace="structure r/managedDeviceLink"/>)
+ </span>
+ </td>
+ <td class="tablevalues" tal:content="r/memory"/>
+ <td><a tal:attributes="href r/getParentDeviceUrl"
+ tal:content="r/getParentDeviceName"/>
+
+ </tr>
+ </tal:block>
+ <tr>
+ <td colspan="0" class="tableheader" align='center'>
+ <form metal:use-macro="here/zenTableNavigation/macros/navtool"/>
+ </td>
+ </tr>
+</tal:block>
+</tal:block>
+</form>
+
+</tal:block>
+
+</tal:block>
+</tal:block>
+</tal:block>
+</tal:block>
0 ZenPacks/puzzle/VMReportXen/skins/ZenPacks.puzzle.VMReportXen/placeholder.txt
No changes.
12 ZenPacks/puzzle/VMReportXen/tests/__init__.py
@@ -0,0 +1,12 @@
+# ##########################################################################
+#
+# This program is part of Zenoss Core, an open source monitoring platform.
+# Copyright (C) 2008, Zenoss Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 as published by
+# the Free Software Foundation.
+#
+# For complete information please visit: http://www.zenoss.com/oss/
+#
+# ##########################################################################
1 ZenPacks/puzzle/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
69 setup.py
@@ -0,0 +1,69 @@
+################################
+# These variables are overwritten by Zenoss when the ZenPack is exported
+# or saved. Do not modify them directly here.
+# NB: PACKAGES is deprecated
+NAME = "ZenPacks.puzzle.VMReportXen"
+VERSION = "1.0"
+AUTHOR = "Jürg Gerber"
+LICENSE = "GPLv2"
+NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.puzzle']
+PACKAGES = ['ZenPacks', 'ZenPacks.puzzle', 'ZenPacks.puzzle.VMReportXen']
+INSTALL_REQUIRES = ['ZenPacks.zenoss.ZenossVirtualHostMonitor', 'ZenPacks.zenoss.XenMonitor']
+COMPAT_ZENOSS_VERS = '>=2.5'
+PREV_ZENPACK_NAME = ""
+# STOP_REPLACEMENTS
+################################
+# Zenoss will not overwrite any changes you make below here.
+
+from setuptools import setup, find_packages
+
+setup(
+ # This ZenPack metadata should usually be edited with the Zenoss
+ # ZenPack edit page. Whenever the edit page is submitted it will
+ # overwrite the values below (the ones it knows about) with new values.
+ name = NAME,
+ version = VERSION,
+ author = AUTHOR,
+ license = LICENSE,
+
+ # This is the version spec which indicates what versions of Zenoss
+ # this ZenPack is compatible with
+ compatZenossVers = COMPAT_ZENOSS_VERS,
+
+ # previousZenPackName is a facility for telling Zenoss that the name
+ # of this ZenPack has changed. If no ZenPack with the current name is
+ # installed then a zenpack of this name if installed will be upgraded.
+ prevZenPackName = PREV_ZENPACK_NAME,
+
+ # Indicate to setuptools which namespace packages the zenpack
+ # participates in
+ namespace_packages = NAMESPACE_PACKAGES,
+
+ # Tell setuptools what packages this zenpack provides.
+ packages = find_packages(),
+
+ # Tell setuptools to figure out for itself which files to include
+ # in the binary egg when it is built.
+ include_package_data = True,
+
+ # The MANIFEST.in file is the recommended way of including additional files
+ # in your ZenPack. package_data is another.
+ #package_data = {}
+
+ # Indicate dependencies on other python modules or ZenPacks. This line
+ # is modified by zenoss when the ZenPack edit page is submitted. Zenoss
+ # tries to put add/delete the names it manages at the beginning of this
+ # list, so any manual additions should be added to the end. Things will
+ # go poorly if this line is broken into multiple lines or modified to
+ # dramatically.
+ install_requires = INSTALL_REQUIRES,
+
+ # Every ZenPack egg must define exactly one zenoss.zenpacks entry point
+ # of this form.
+ entry_points = {
+ 'zenoss.zenpacks': '%s = %s' % (NAME, NAME),
+ },
+
+ # All ZenPack eggs must be installed in unzipped form.
+ zip_safe = False,
+)

0 comments on commit c972da3

Please sign in to comment.
Something went wrong with that request. Please try again.