Merge pull request #76 from jordi-puig/develop

OPENNAAS-177 exported topology uses correct resource names
Merge branch 'develop' of git://github.com/dana-i2cat/opennaas into develop
Move exporttopology.karaf to extensions folder and remove old manticore
folder
Merge pull request #77 from jordi-puig/feature/remove-manticore-folder

Feature/remove manticore folder
Merge branch 'feature/rename-group-id-and-folders' of https://github.com/gbehrmann/opennaas into gbehrmann-feature/rename-group-id-and-folders
Merge branch 'develop' of git://github.com/dana-i2cat/opennaas into develop
Renamed core project artifacts

These now follow the convention org.opennaas.core.PROJECT. The
bundle symbolic name is identical to the artifact ID.
Renamed extensions artifacts

They now follow the naming convention (ie org.opennaas+path
elements). The exception to the rule is that the bundles folder
name is not included in the artifact ID as I expect that folder
to be deleted.

Java package named are unaltered. Those will be renamed later.

Defaults for bundle symbolic name are now defined in the top
level pom and should not be repeated in subprojects.
Renamed integration test artifacts

They now follow the new naming convention.
build: Fix package export declaration

Otherwise we run into problems when renaming packages later.
extensions: Refactor Java package names

Extension packages now follow the proposed naming scheme.

There are two exceptions: The Junos and Wonesys packages
are slightly different from the artifact IDs. I suggest the
artifact IDs are adjusted to match the package names rather
than the other way around.

The change was produced by the following script:

    #!/bin/sh

    find_package_root() {
        find $1/src/main/java/ -type d \( ! -links 3 -or -exec sh -c "find {} -maxdepth 1 -type f | grep -q ''" \; \)  -print -quit
    }

    package2path() {
        echo $1 | sed -e 's:\.:/:g'
    }

    path2package() {
        echo $1 | sed -e "s:.*/src/.*/java/::" -e "s:/:.:g"
    }

    move() {
        if [ -d $1 ]; then
            mkdir -p $2
            git mv $1/* $2/
        fi
    }

    replace_package() {
        find * -type f -exec sed -i -e "/artifactId/ n" -e "s:$1\([;.*]\):$2\1:g" {} \;
    }

    # The script can run in two modes:
    #
    # - Either a BASE directory and a package PREFIX is provided as
    #   arguments. In this case the script will proposed a rename map.
    #
    # - Or the script can read a rename map from stdin and perform the
    #   renaming.
    #

    if [ $# -eq 2 ]; then
        BASE=$1
        PREFIX=$2

        for DIR in $BASe/*; do
            if [ -d $DIR ]; then
                OLD=$(path2package $(find_package_root $DIR))
                NEW=$PREFIX.$(basename $DIR)
                echo $DIR $OLD $NEW
            fi
        done | sort -r --key=2,2 | column -t
    else
        while read DIR OLDP NEWP; do
            OLD=$(package2path $OLDP)
            NEW=$(package2path $NEWP)

            move $DIR/src/main/java/$OLD/ $DIR/src/main/java/$NEW
            move $DIR/src/test/java/$OLD/ $DIR/src/test/java/$NEW

            replace_package $OLDP $NEWP

            echo "$OLDP -> $NEWP"
        done
    fi

I used the following mapping file:

    extensions/bundles/router.capability.staticroute  org.opennaas.router.capability.staticroute     org.opennaas.extensions.router.capability.staticroute
    extensions/bundles/router.capability.ospf         org.opennaas.router.capability.ospf            org.opennaas.extensions.router.capability.ospf
    extensions/bundles/router.capability.gretunnel    org.opennaas.router.capability.gretunnel       org.opennaas.extensions.router.capability.gretunnel
    extensions/bundles/network.capability.queue       org.opennaas.network.capability.queue          org.opennaas.extensions.network.capability.queue
    extensions/bundles/network.capability.ospf        org.opennaas.network.capability.ospf           org.opennaas.extensions.network.capability.ospf
    extensions/bundles/bod.repository                 org.opennaas.bod.repository                    org.opennaas.extensions.bod.repository
    extensions/bundles/bod.capability.l2bod           org.opennaas.bod.capability.l2bod              org.opennaas.extensions.bod.capability.l2bod
    extensions/bundles/bod.actionsets.dummy           org.opennaas.bod.actionsets.dummy              org.opennaas.extensions.bod.actionsets.dummy
    extensions/bundles/nexus.tests.helper             net.i2cat.nexus.tests                          org.opennaas.extensions.nexus.tests.helper
    extensions/bundles/nexus.alarms.repository        net.i2cat.nexus.alarms.repository              org.opennaas.extensions.nexus.alarms.repository
    extensions/bundles/router.repository              net.i2cat.mantychore.repository                org.opennaas.extensions.router.repository
    extensions/bundles/queuemanager                   net.i2cat.mantychore.queuemanager              org.opennaas.extensions.queuemanager
    extensions/bundles/protocols.netconf              net.i2cat.mantychore.protocols.netconf         org.opennaas.extensions.protocols.netconf
    extensions/bundles/network.repository             net.i2cat.mantychore.network.repository        org.opennaas.extensions.network.repository
    extensions/bundles/network.model                  net.i2cat.mantychore.network.model             org.opennaas.extensions.network.model
    extensions/bundles/network.capability.basic       net.i2cat.mantychore.network.capability.basic  org.opennaas.extensions.network.capability.basic
    extensions/bundles/router.model                   net.i2cat.mantychore.model                     org.opennaas.extensions.router.model
    extensions/bundles/fragment.velocity              net.i2cat.mantychore.fragment.velocity         org.opennaas.extensions.fragment.velocity
    extensions/bundles/router.capability.ip           net.i2cat.mantychore.capability.ip             org.opennaas.extensions.router.capability.ip
    extensions/bundles/router.capability.chassis      net.i2cat.mantychore.capability.chassis        org.opennaas.extensions.router.capability.chassis
    extensions/bundles/router.actionsets.junos        net.i2cat.mantychore.actionsets.junos          org.opennaas.extensions.router.junos.actionssets
    extensions/bundles/router.actionsets.junos        net.i2cat.mantychore.commandsets.junos         org.opennaas.extensions.router.junos.commandsets
    extensions/bundles/router.actionsets.junos        net.i2cat.mantychore.action.junos              org.opennaas.extensions.router.junos.action
    extensions/bundles/roadm.repository               net.i2cat.luminis.ROADM.repository             org.opennaas.extensions.roadm.repository
    extensions/bundles/roadm.capability.monitoring    net.i2cat.luminis.capability.monitoring        org.opennaas.extensions.roadm.capability.monitoring
    extensions/bundles/roadm.capability.connections   net.i2cat.luminis.capability.connections       org.opennaas.extensions.roadm.capability.connections
    extensions/bundles/roadm.protocols.wonesys        net.i2cat.luminis.protocols.wonesys            org.opennaas.extensions.roadm.wonesys.protocols
    extensions/bundles/roadm.protocols.wonesys        net.i2cat.luminis.transports.wonesys           org.opennaas.extensions.roadm.wonesys.transports
    extensions/bundles/roadm.actionsets.wonesys       net.i2cat.luminis.actionsets.wonesys           org.opennaas.extensions.roadm.wonesys.actionsets
    extensions/bundles/roadm.actionsets.wonesys       net.i2cat.luminis.commandsets.wonesys          org.opennaas.extensions.roadm.wonesys.commandsets

A draft of the mapping was produced by the script, but was
subsequently adjusted by hand.

Testing done: Unit and integration tests pass. OpenNaaS starts.
Solved pull/75 merge conflicts
Change the pattern of the GRE Endpoint names, and solve the problem described at OPENNAAS-245 issue.
The GRE Tunnel interfaces should be like gr-x/x/x.x

It's necessary that a gre Interface is configured at the physical router (with the name of the interface would be enough).
This has to be changed when we create a command that gets all the interfaces (no matter if they're configured or no) from the Physical Router.
Update the GRETunnel Commands, Actions and Tests with the changes mentioned at the previous commit.
ConfigureSubInterface can create a GRE Logical Interface.
Also it's describes at the showIntefaces Command, so the user could know the name of the GRE interface he can configure.
Merge branch 'develop' of git://github.com/dana-i2cat/opennaas into develop

Conflicts:
	extensions/bundles/router.actionsets.junos/src/main/java/org/opennaas/extensions/router/junos/actionssets/actions/GetConfigurationAction.java
	extensions/bundles/router.actionsets.junos/src/main/java/org/opennaas/extensions/router/junos/commandsets/digester/IPInterfaceParser.java
	extensions/bundles/router.actionsets.junos/src/test/java/org/opennaas/extensions/router/junos/action/test/GetGRETunnelActionTest.java
	extensions/bundles/router.actionsets.junos/src/test/java/org/opennaas/extensions/router/junos/actionssets/digester/test/IPInterfaceParserTest.java
	extensions/bundles/router.capability.chassis/src/main/java/org/opennaas/extensions/router/capability/chassis/shell/ShowInterfacesCommand.java
	extensions/bundles/router.capability.gretunnel/src/main/java/org/opennaas/extensions/router/capability/gretunnel/shell/CreateTunnelCommand.java
	tests/integration/router.capability.gretunnel/src/test/java/org/opennaas/router/tests/capability/GRETunnelIntegrationTest.java
	tests/integration/sprint0_4/src/test/java/interfaces/configure/ConfigureSubInterfaceTest.java
Fixed compilation errors after the merge.
Sets the template for GRE Logical interface
- Adds GRE Interfaces in OSPF Areas
- Disable OSPF in the hole network resource.
Scripts and descriptors for the demo