[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]


Testing Applications by Using a NIC Proxy Stub on Solaris Platforms

To test an application without NIC, you can configure a NIC proxy stub to take the place of the NIC. The NIC proxy stub comprises a set of explicit mappings of data keys and values in the namespace that contains the NIC proxy properties. When the SRC component passes a specified key to the NIC proxy stub, the NIC proxy stub returns the corresponding value.

For example, you can specify a subscriber's IP address that is associated with a particular SAE. When the SRC component passes this IP address to the NIC proxy stub, the NIC proxy stub returns the corresponding SAE.

Configuring a NIC Proxy Stub from SDX Admin

To use SDX Admin to configure a NIC proxy stub:

  1. In the navigation pane, select the entry for the NIC proxy.
  2. Add the following line to the NIC proxy properties.
  3. Gateway.nic.NicProxyClassName = net.juniper.smgt.gateway.gal.proxy.NicProxyStub
    
    
    

For example, for Dynamic Service activator, located under l=DynamicServiceActivation, l=WebApplication, ou=staticConfiguration, ou=Configuration, o=Management, o=umc, you would add the lines similar to the following:

/nicProxies/ip/Gateway.nic.NicProxyClassName = 
net.juniper.smgt.gateway.gal.proxy.NicProxyStub
/nicProxies/ip/ANY_KEY = corbaloc::192.2.7.100:8801/SAE

When you use a NIC proxy stub, you must also configure test data for the stub to use.

See Configuring the Test Data.

Configuring the Test Data

To use a NIC proxy stub, you configure test data for the NIC proxy to use. You can specify that the test data indicate that any key return a specific SAE or that one or more keys map to particular values. If you specify an explicit SAE for a key, the NIC proxy stub returns the IOR for that SAE, rather than the value defined for the ANY_KEY property.

To configure test data, do one of the following:

See Configuring a NIC Proxy Stub to Use a corbaloc URL to Test Data.

See Configuring a NIC Proxy Stub to Use a File URL to Test Data.

See Configuring a NIC Proxy Stub to Use an IOR to Test Data.

Configuring a NIC Proxy Stub to Use a corbaloc URL to Test Data

To configure a NIC proxy stub to use the corbaloc URL:

  1. In the NIC proxy configuration, add a line in the format corbaloc::<host>:<port>/SAE

For example, corbaloc::127.0.0.1.145:8801/SAE.

  1. In the NIC proxy configuration, add a line to return any key to a specific SAE or a key that the NIC proxy receives.

To return any key, add a line in the format ANY_KEY=corbaloc::<host>:<port>/SAE

For example, ANY_KEY=corbaloc::sae1:8801/SAE

To specify explicit mapping between keys and values, add lines in the following format to the NIC proxy configuration.

<mapping>=corbaloc::<host>:<port>/SAE

For example, the following test data comprises two subscriber IP addresses associated with different SAEs. You define two explicit mappings:

192.0.2.10 = corbaloc::sae1:8801/SAE
192.0.2.11 = corbaloc::sae2:8801/SAE

Configuring a NIC Proxy Stub to Use a File URL to Test Data

To configure a NIC proxy stub to use the IOR file:

  1. In the NIC proxy configuration, add a line in the format file://<absolute path to the IOR file.

For example, file:///opt/UMC/sae/var/run/sae.ior

  1. In the NIC proxy configuration, add a line to return any key to a specific SAE or a key that the NIC proxy receives.

To return any key, add a line in the format ANY_KEY=file://<absolute path to the IOR file>.

For example, ANY_KEY=file:///opt/UMC/sae/var/run/sae.ior

To specify explicit mapping between keys and values, add lines in the following format to the NIC proxy configuration.

<mapping>=file://<absolute path to the IOR file>

For example, the following test data comprises two subscriber IP addresses associated with the same SAE. You define two explicit mappings:

192.0.2.0 = file:///opt/UMC/sae/var/run/sae.ior
192.0.2.1 = file:///opt/UMC/sae/var/run/sae.ior

Configuring a NIC Proxy Stub to Use an IOR to Test Data

To configure a NIC proxy stub to use a copy of the IOR:

  1. Access the sae.ior file in the directory /opt/UMC/sae/var/run.
  2. Copy the complete IOR of the SAE from this file.
  3. In the NIC proxy configuration, add a line to return any key to a specific SAE or a key that the NIC proxy receives.

To return any key, add a line in the format ANY_KEY=<SAE_IOR>.

For example:

ANY_KEY = 
IOR:000000000000003549444C3A736D67742E6A756E697065722E6E65742
F7361652F5365727669636541637469766174696F6E456E67696E653A312
E3000000000000000020000000000000070000102000000000D31302E323
2372E312E323031000022610000001B5374616E64617264496D706C4E616
D652F736165504F412F53414500000000020000000000000008000000004
A414300000000010000001C0000000000010001000000010501000100010
1090000000105010001000000010000002C0000000000000001000000010
000001C00000000000100010000000105010001000101090000000105010
001

To specify explicit mapping between keys and values, add lines in the following format to the NIC proxy configuration.

<key>=<value>

For example, the following test data comprises two subscriber IP addresses associated with different SAEs. You can define two explicit mappings:

192.0.2.0 = 
IOR:000000000000003549444C3A736D67742E6A756E697065722E6E65742
F7361652F5365727669636541637469766174696F6E456E67696E653A312
E3000000000000000020000000000000070000102000000000D31302E323
2372E312E323031000022610000001B5374616E64617264496D706C4E616
D652F736165504F412F53414500000000020000000000000008000000004
A414300000000010000001C0000000000010001000000010501000100010
1090000000105010001000000010000002C0000000000000001000000010
000001C00000000000100010000000105010001000101090000000105010
001
192.0.2.1 =
IOR:000000000000002438444C3A736D67742E6A756E697065722E6E65742
F7361652F5365727669636541637469766174696F6E456E67696E653A312
E3000000000000000020000000000000070000102000000000D31302E323
2372E312E323031000022610000001B5374616E64617264496D706C4E616
D652F736165504F412F53414500000000020000000000000008000000004
A414300000000010000001C0000000000010001000000010501000100010
1090000000105010001000000010000002C0000000000000001000000010
000001C00000000000100010000000105010001000101090000000105010
001

[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]