From OpenNMS
Feature Description
Display on opennms Maps all the maps (as elements of the default map) that contain a user specified label. The node label match is made using an iplike criteria: this means that are found all the map that contain elements for which the specified labe is a substring of the node label.
Strategy
- Create a new Map Menu Item "Search Maps"
- Hitting the "Search Maps" in the Map Menu will open a text box and a selection box
- Hit any character in the text box then the selection box list all the map that contains a node with a specified 'label' in a text box.
- Open a map by selecting one in the selection box and hit the return button.
- Create a Map on the user request that contains all the selection box listed maps as elements without selecting any map in selection box and hitting the return button.
- The Created Map is displayed with all his mapElements as "subMap" that will contain the node with the label specified.
- The Created Map is navigable.
Acceptance Criteria
The Map with the appropriate mapElement (submaps) is displayed in the opennms Map Application.
Step 0. Configure the Automatic Maps
Create mapsadapter-configuration.xml
Map Adapter Configuration Example
<?xml version="1.0"?>
<maps-adapter-configuration element-dimension="50">
<package name="site-a">
<filter>nodeLabel like 'site-a-%'</filter>
<include-range begin="1.1.1.1" end="254.254.254.254" />
</package>
<package name="site-b">
<filter>nodeLabel like 'site-b-%'</filter>
<include-range begin="1.1.1.1" end="254.254.254.254" />
</package>
<package name="site-">
<filter>nodeLabel like 'site-%'</filter>
<include-range begin="1.1.1.1" end="254.254.254.254" />
</package>
<cmaps>
<cmap mapName="Sites" mapOwner="admin" mapAccess="RW" mapWidth="800" mapHeight="600">
<csubmap name="site-a" label="Site A" x="485" y="350" />
<csubmap name="site-b" label="Site B" x="485" y="450" />
</cmap>
<cmap mapName="site-a" mapOwner="admin" mapAccess="RW" mapWidth="800" mapHeight="600">
<celement package="site-a" icon="switch"/>
</cmap>
<cmap mapName="site-b" mapOwner="admin" mapAccess="RW" mapWidth="800" mapHeight="600">
<celement package="site-b" icon="switch"/>
</cmap>
<cmap mapName="site-" mapOwner="admin" mapAccess="RW" mapWidth="800" mapHeight="600">
<celement package="site-" icon="server"/>
</cmap>
</cmaps>
</maps-adapter-configuration>
Step 1. Provision nodes
provision the following node to the system:
a) add an import group testEntityCSS
b) add the following nodes to the group:
- site-a-1 with ip 10.1.1.1
- site-a-2 with ip 10.2.1.1
- site-a-abc123 with ip 10.3.1.1
- site-b-1 with ip 10.1.2.10
- site-b-1 with ip 10.1.2.1
- site-b-2 with ip 10.2.2.1
- site-b-abc456 with ip 10.3.2.1
- site-a-site-b-sfhdjkf with ip 10.10.10.10
- testnode with ip 10.10.20.10
c) import the group testEntityCSS
Step 2. Verify the maps are created and properly displayed
Go into the map page and verify the all the maps are created.
- Verify also that map site-a contains all the site-a like node
- Verify map site-b contains all the site -b like node.
- Verify map site- contains all the site- nodes
- Verify that testnode is not found in any maps
Step 3. Get the Map Entity containing subMaps A
- Open the OpenNMS map page.
- Go to the map Menu and hit "search maps"
- In the Text Box type 'abc123' and hit return
- Verify that a map is open that contain only site-a map
- Verify that if you have admin role you can save this map
- Verify you can access the contaner submaps double clicking the icons
Step 4. Get the Map Entity containing subMaps B
- Open the OpenNMS map page.
- Go to the map Menu and hit "search maps"
- In the Text Box type 'abc' and hit return
- Verify that a map is open that contain site-a site-b and site- map
- Verify you can access the contaner submaps double clicking the icons
- Verify that you can hit the map navigation back button to return to the searched container map
- Verify that if you have admin role you can save this map
Step 5. Get the Map Entity containing subMaps C
- Open the OpenNMS map page.
- Go to the map Menu and hit "search maps"
- In the Text Box type 'lmn' and hit return
- Verify that a map is open and does not contain any submap
Step 6. Get the Map Entity containing subMaps D
- Open the OpenNMS map page.
- Go to the map Menu and hit "search maps"
- In the Text Box type 'site-a' and hit return
- Verify that a map is open and contains site-a and site- submap
Step 7. Get the Map Entity containing subMaps E
- Open the OpenNMS map page.
- Go to the map Menu and hit "search maps"
- In the Text Box type 'testnode' and hit return
- Verify that a map is open and does not contain any submap
Step 8. Open a Map From Selection box
- Open the OpenNMS map page.
- Go to the map Menu and hit "search maps"
- In the Text Box type 'site'
- Verify that in the selection box are dispayed the sita-a site-b and site- map
- Select the site-b map and hit return
- Verify that site-b map is opened






