Exemple #1
0
    def query_java(self, request_obj):
        from org.jboss.dmr import ModelNode
        controller_client = self.getOption('controller_client_proxy')
        if not controller_client:
            raise AttributeError("Controller Client is not available")

        request = ModelNode()
        request.get("operation").set(request_obj.operation)

        for key, val in request_obj.url_parts():
            request.get('address').add(key,val)

        if request_obj.parameters:
            for key, value in request_obj.parameters.iteritems():
                request.get(key).set(value)

        return controller_client.execute(request).toJSONString(True)
    def query_java(self, request_obj):
        from org.jboss.dmr import ModelNode
        import sos

        request = ModelNode()
        request.get("operation").set(request_obj.operation)

        for key, val in request_obj.url_parts():
            request.get('address').add(key,val)

        if request_obj.parameters:
            for key, value in request_obj.parameters.iteritems():
                request.get(key).set(value)

        return sos.controllerClient.execute(request).toJSONString(True)