Differences between revisions 2 and 3
Revision 2 as of 2010-11-19 14:34:13
Size: 965
Comment:
Revision 3 as of 2010-11-19 14:44:10
Size: 1666
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
in a web browser makes the current test system return: in a web browser could make the test system return (depending on the configuration):
Line 32: Line 32:
even though the roles {{{doghouse}}} and {{{henhouse}}} do not exist in the test configuration. Any queries on roles which do not exist in the configuration will just be ignored. Thus, if there are no "hits" on the query, then the service will reply with an empty page.

== getRoles ==

This method returns a comma separated list of all the roles associated with a specific IP address (IPv4 or IPv6 depending on the configuration).

=== Example: ===

Typing:

{{{
http://alhena:7980/iprolemapping/getRoles/130.225.26.33
}}}

in a web browser could make the test system return (depending on the configuration):

{{{
doghouse,henhouse,inhouse
}}}

If a query is made on an IP address (IPv4 or IPv6 depending on the configuration) which has not been associated with any role in the configuration, the the service just replies with an empty page.

IP-Role Mapper Service Usage

The IP-Role mapper is a REST based web-service which provides three methods; getRanges, getRoles and status.

getRanges

This method returns a new-line separated list of IP ranges associated with one or more roles. If any of the IP ranges, associated with the roles, overlap each other then they will be merged into a single range.

The method is invoked by an URL of the form:

http://<context root>/iprolemapper/getRanges&role=<some role>&role=<another role>....&role=<yet another role>

Example:

Typing:

http://alhena:7980/iprolemapping/getRanges?role=inhouse&role=doghouse&role=henhouse

in a web browser could make the test system return (depending on the configuration):

172.18.0.0-172.18.255.255
130.255.26.35
127.0.0.1
172.16.7.0-172.16.7.255
130.225.24.0-130.225.25.255
130.225.26.33

Any queries on roles which do not exist in the configuration will just be ignored. Thus, if there are no "hits" on the query, then the service will reply with an empty page.

getRoles

This method returns a comma separated list of all the roles associated with a specific IP address (IPv4 or IPv6 depending on the configuration).

Example:

Typing:

http://alhena:7980/iprolemapping/getRoles/130.225.26.33

in a web browser could make the test system return (depending on the configuration):

doghouse,henhouse,inhouse

If a query is made on an IP address (IPv4 or IPv6 depending on the configuration) which has not been associated with any role in the configuration, the the service just replies with an empty page.

IPRoleMapperUsage (last edited 2011-03-22 13:17:35 by jrg)