[jboss-jira] [JBoss JIRA] (WFLY-2263) Access control meta data: Instance references

Kabir Khan (JIRA) jira-events at lists.jboss.org
Wed Oct 9 13:00:02 EDT 2013


    [ https://issues.jboss.org/browse/WFLY-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12812826#comment-12812826 ] 

Kabir Khan edited comment on WFLY-2263 at 10/9/13 12:58 PM:
------------------------------------------------------------

Or is it better to have a normal map of instance names, which then contain a list each? e.g.

{code}
    public static void main(String[] args) {
        ModelNode node = new ModelNode();

        node.get("HostA").add(createEntry("Server-1", "HostA"));
        node.get("HostA").add(createEntry("Server-2", "HostA"));
        node.get("HostB").add(createEntry("Server-2", "HostB"));

        System.out.println(node);
    }

    private static ModelNode createEntry(String server, String host) {
        ModelNode node = new ModelNode();
        node.get("addresss").add("subsystem", "undertow");
        node.get("addresss").add("server", server);
        node.get("addresss").add("host", host);
        node.get("read").set(true);
        node.get("write").set(true);
        return node;
    }
{code}

{code}
{
    "HostA" => [
        {
            "addresss" => [
                ("subsystem" => "undertow"),
                ("server" => "Server-1"),
                ("host" => "HostA")
            ],
            "read" => true,
            "write" => true
        },
        {
            "addresss" => [
                ("subsystem" => "undertow"),
                ("server" => "Server-2"),
                ("host" => "HostA")
            ],
            "read" => true,
            "write" => true
        }
    ],
    "HostB" => [{
        "addresss" => [
            ("subsystem" => "undertow"),
            ("server" => "Server-2"),
            ("host" => "HostB")
        ],
        "read" => true,
        "write" => true
    }]
}
{code}
If you want anything else, just let me know. It should be trivial to do once I know the format to do
                
      was (Author: kabirkhan):
    Or is it better to have a normal map of instance names, which then contain a list each? e.g.

{code}
    public static void main(String[] args) {
        ModelNode node = new ModelNode();

        node.get("HostA").add(createEntry("Server-1", "HostA"));
        node.get("HostA").add(createEntry("Server-2", "HostA"));
        node.get("HostB").add(createEntry("Server-2", "HostB"));

        System.out.println(node);
    }

    private static ModelNode createEntry(String server, String host) {
        ModelNode node = new ModelNode();
        node.get("addresss").add("subsystem", "datasources");
        node.get("addresss").add("server", server);
        node.get("addresss").add("host", host);
        node.get("read").set(true);
        node.get("write").set(true);
        return node;
    }
{code}

{code}
{
    "HostA" => [
        {
            "addresss" => [
                ("subsystem" => "datasources"),
                ("server" => "Server-1"),
                ("host" => "HostA")
            ],
            "read" => true,
            "write" => true
        },
        {
            "addresss" => [
                ("subsystem" => "datasources"),
                ("server" => "Server-2"),
                ("host" => "HostA")
            ],
            "read" => true,
            "write" => true
        }
    ],
    "HostB" => [{
        "addresss" => [
            ("subsystem" => "datasources"),
            ("server" => "Server-2"),
            ("host" => "HostB")
        ],
        "read" => true,
        "write" => true
    }]
}
{code}
If you want anything else, just let me know. It should be trivial to do once I know the format to do
                  
> Access control meta data: Instance references
> ---------------------------------------------
>
>                 Key: WFLY-2263
>                 URL: https://issues.jboss.org/browse/WFLY-2263
>             Project: WildFly
>          Issue Type: Enhancement
>          Components: Domain Management
>            Reporter: Heiko Braun
>            Assignee: Brian Stansberry
>             Fix For: 8.0.0.CR1
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list