Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-422

File upload/manipulation through management API - modules, config files

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • CLI
    • None

      It would be nice to have a possibility to upload certain files. Namely:

      • create modules (e.g. JDBC drivers)
      • copy .properties files - logging, security etc.
      • ssh keys, certificates etc.

      Could be limited to the examples above - i.e. one operation for creating/removing a module, another for copying a file to configuration/ .

      /:add-config-file(file=foo.properties, ifExists=fail|skip|overwrite|...)
      
      /:add-module(file=foo.jar, name=org.jboss.foo, version=main, dependencies=["org.jboss.bar"], imports=[...] exports=[...] ifExists=fail|skip|overwrite|...)
      

      To avoid the complexity of distributing such file amongst managed domain, the op could be scoped to just a single host, like

      /host=host1:add-config-file(...)
      

      File transfer
      =============

      The same principle could be used as for deployments (-ModelNode.readExternal()- ?)

      CLI's DeployHander#execute():

                      OperationBuilder op = new OperationBuilder(request);
                      op.addFileAsAttachment(f);
                      request.get(Util.CONTENT).get(0).get(Util.INPUT_STREAM_INDEX).set(0);
                      Operation operation = op.build();
                      result = ctx.getModelControllerClient().execute(operation);
                      operation.close();
      

      Specifics
      =========

      The file manipulation in add-module would be performed by JBoss Modules through an appropriate API.

      The file manipulation in add-config-file would be performed by the part of AS which knows where the config is actually read from (in case it is variable) - MSC?

              Unassigned Unassigned
              ozizka_jira Ondrej Zizka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: