def createPluginFeatures(application):
    application.register(
        Feature(owner=Owner(name=__package__),
                name="cim",
                description="Offers informations via CIM"))
def createPluginFeatures(application):
    application.register(Feature(owner=Owner(name=__package__),
                                 name="ui",
                                 description="Has a UI"))
示例#3
0
def createPluginFeatures(application):
    application.register(Feature(owner=Owner(name=__package__),
                                 name="ipmi",
                                 description="Offers IPMI Status via IPMI"))
def createPluginFeatures(application):
    application.register(
        Feature(owner=Owner(name=__package__),
                name="puppet",
                description="Offers provisioning via puppet"))
示例#5
0
    bottle.run(app, host='0.0.0.0', port=8082, reloader=True, debug=True)


class CpeProperty(Property):
    description = "This feature represents the CPE of this product"
    name = "version"
    namespace = "cpe"
    value = SystemRelease().cpe()


if __name__ == "__main__":
    # Create a feature registry
    registry = Registry()

    # Statically register a feature which represents the version
    registry.register(CpeProperty(owner=Owner(name=__name__)))

    # Now go through all plugins and see if they want to publish sth too
    groups = loader.plugin_groups_iterator(setup, "createPluginFeatures")
    for group, createPluginFeatures in groups:
        if createPluginFeatures:
            logging.info("Registering feature from %s" % group)
            createPluginFeatures(registry)

    # The registry is now build time to publish it

    if "-d" in sys.argv:
        # Via a http daemon
        launch_bottle(registry)
    elif "dumpxml" in sys.argv:
        # In XML to stdout
示例#6
0
def createPluginFeatures(application):
    application.register(
        Feature(owner=Owner(name=__package__),
                name="RHN",
                description="Offers RHN Registration \
                                 via RHN"))