Operating Systems: AIX, HP-UX, Linux, Solaris, Windows, z/OS
Rules for ODR routing policy administrative tasks
You can use administrative tasks to configure HTTP or Session Initiation Protocol (SIP) rules for the on demand router (ODR) routing policy. You can specify SIP or HTTP protocols in the commands. The following examples use SIP as the protocol:
- addRoutingRule
- changeRoutingDefaultRulesAction
- changeRoutingRuleAction
- changeRoutingRuleExpression
- changeRoutingRulePriority
- createRoutingRules
- listRoutingRules
- removeRoutingRule
addRoutingRule
The addRoutingRule command adds a routing policy rule.
Required parameters
- -protocol
- Name of the protocol to associate with the rules. (String, required)
- -priority
- Positive integer value representing the priority of the rule. Zero is the highest priority. (String, required)
- -expression
- Specifies the rule expression. The expression must be enclosed in double quotes. (String, required)
- -actionType
- Specifies the type of action to associate with the rule. (String, required)The following list contains the types of actions to associate with HTTP rules:
The following list contains the types of actions to associate with SIP rules:
- permit: Permit routing to
- reject: Reject routing with return code
- permitsticky: Permit routing with affinity
- permitMM: Permit to servers in maintenance mode
- permitstickyMM: Permit with affinity to servers in maintenance mode
- permit: Permit routing to
- reject: Reject routing with return code
Optional parameters
- -odrname
- Name of the ODR to apply the routing policy work class. Required only if modifying an ODR.
- -nodename
- Name of the node on which the ODR resides. Required only if modifying an ODR.
- -clustername
- Name of the cluster to which to apply the rules. Required only if modifying an on demand router cluster.
- -multiclusterAction
- Specifies the method to route requests if multiple routing location clusters are matched. Required only if actionType is equal to permit. The following list contains the possible values for HTTP rules:
The following list contains the possible values for SIP rules:
- WRR: Weighted Round Robin load balance. For UDP retransmission, maintain affinity.
- Failover: Find the first cluster with an available server and load balance across that cluster. Note that the order of a dynamically generated list of clusters is undefined.
- WLOR: Weighted least outstanding request.
- Error: If there are multiple clusters, to select from it throws an error. it expects one and only one cluster.
- WRR: Weighted Round Robin load balance. For UDP retransmission, maintain affinity.
- Failover: Find the first cluster with an available server and load balance across that cluster. Note that the order of a dynamically generated list of clusters is undefined.
- -routingLocations
- Specifies a list of target locations to route requests. Required only if actionType is equal to permit.Each operand in the list follows one of three formats, and can contain a wildcard * value, which matches any value:
With SIP routing rules only, you can alternatively define target clusters through a rule expression. The valid operators are AND, OR, NOT and parenthetical grouping. Format according to the following list:
- cluster=cellName/clusterName
- server=cellName/nodeName/serverName
- module=cellName/applicationName/applicationVersion/moduleName
- cluster=cellName/clusterName
- server=cellName/nodeName/serverName
- modules=cellName/applicationName/applicationVersion/moduleName
- server maintenance mode=true or false
- node maintenance mode=true or false
- protocol=PROTO_VALUE:
- PROTO_SIP = sip
- SIP over TCP
- PROTO_SIPS = sips
- SIP over SSL and TCP
- PROTO_SIPU = sipu
- SIP over UDP
- PROTO_SIPX = sipx
- SIP over XMEM
- -errorcode
- Integer error code to reject request. Required only if actionType is equal to reject.
Return value
Batch mode example usage
- Use Jacl:
$AdminTask addRoutingRule {-odrname odr -nodename node1 -protocol SIP -priority 0 -expression "request.method = 'getOperation0'" -actionType permit -multiclusterAction Failover -routingLocations cluster=*/*}- Use Jython string:
AdminTask.addRoutingRule('[-odrname odr] [-nodename node1] [-protocol SIP] [-priority 0] [-expression "request.method = 'getOperation0'"] [-actionType permit] [-multiclusterAction Failover] [-routingLocations cluster=*/*]')Interactive mode example usage
- Use Jacl:
$AdminTask addRoutingRule {-interactive}- Use Jython string:
AdminTask.addRoutingRule ('[-interactive]')
changeRoutingDefaultRulesAction
The changeRoutingDefaultRulesAction command changes the routing policy default action for a rule.
Required parameters
- -protocol
- Name of the protocol to associate with the rules. (String, required)
Optional parameters
- -odrname
- Name of the ODR to apply the routing policy work class. Required only if modifying an ODR.
- -nodename
- Name of the node on which the ODR resides. Required only if modifying an ODR.
- -clustername
- Name of the cluster to which to apply the rules. Required only if modifying an on demand router cluster.
- -multiclusterAction
- Specifies the method to route requests if multiple routing location clusters are matched. Required only if actionType is equal to permit. The following list contains the possible values for HTTP rules:
The following list contains the possible values for SIP rules:
- WRR: Weighted Round Robin load balance. For UDP retransmission, maintain affinity.
- Failover: Find the first cluster with an available server and load balance across that cluster. Note that the order of a dynamically generated list of clusters is undefined.
- WLOR: Weighted least outstanding request.
- Error: If there are multiple clusters, to select from it throws an error. it expects one and only one cluster.
- WRR: Weighted Round Robin load balance. For UDP retransmission, maintain affinity.
- Failover: Find the first cluster with an available server and load balance across that cluster. Note that the order of a dynamically generated list of clusters is undefined.
- -routingLocations
- Specifies a list of target locations to route requests. Required only if actionType is equal to permit.Each operand in the list follows one of three formats, and can contain a wildcard * value, which matches any value:
With SIP routing rules only, you can alternatively define target clusters through a rule expression. The valid operators are AND, OR, NOT and parenthetical grouping. Format according to the following list:
- cluster=cellName/clusterName
- server=cellName/nodeName/serverName
- module=cellName/applicationName/applicationVersion/moduleName
- cluster=cellName/clusterName
- server=cellName/nodeName/serverName
- modules=cellName/applicationName/applicationVersion/moduleName
- server maintenance mode=true or false
- node maintenance mode=true or false
- protocol=PROTO_VALUE:
- PROTO_SIP = sip
- SIP over TCP
- PROTO_SIPS = sips
- SIP over SSL and TCP
- PROTO_SIPU = sipu
- SIP over UDP
- PROTO_SIPX = sipx
- SIP over XMEM
- -errorcode
- Integer error code to reject request. Required only if actionType is equal to reject.
Return value
Batch mode example usage
- Use Jacl:
$AdminTask changeRoutingDefaultRulesAction {-odrname odr -nodename node1 -protocol SIP -multiclusterAction Failover -routingLocations cluster=*/*}- Use Jython string:
AdminTask.changeRoutingDefaultRulesAction('[-odrname odr] [-nodename node1] [-protocol SIP] [-multiclusterAction Failover] [-routingLocations cluster=*/*]')Interactive mode example usage
- Use Jacl:
$AdminTask changeRoutingDefaultRulesAction {-interactive}- Use Jython string:
AdminTask.changeRoutingDefaultRulesAction ('[-interactive]')
changeRoutingRuleAction
The changeRoutingRuleAction command changes a routing policy action for a rule.
Required parameters
- -protocol
- Name of the protocol to associate with the rules. (String, required)
- -priority
- Positive integer value representing the priority of the rule. Zero is the highest priority. (String, required)
Optional parameters
- -odrname
- Name of the ODR to apply the routing policy work class. Required only if modifying an ODR.
- -nodename
- Name of the node on which the ODR resides. Required only if modifying an ODR.
- -clustername
- Name of the cluster to which to apply the rules. Required only if modifying an on demand router cluster.
- -multiclusterAction
- Specifies the method to route requests if multiple routing location clusters are matched. Required only if actionType is equal to permit. The following list contains the possible values for HTTP rules:
The following list contains the possible values for SIP rules:
- WRR: Weighted Round Robin load balance. For UDP retransmission, maintain affinity.
- Failover: Find the first cluster with an available server and load balance across that cluster. Note that the order of a dynamically generated list of clusters is undefined.
- WLOR: Weighted least outstanding request.
- Error: If there are multiple clusters, to select from it throws an error. it expects one and only one cluster.
- WRR: Weighted Round Robin load balance. For UDP retransmission, maintain affinity.
- Failover: Find the first cluster with an available server and load balance across that cluster. Note that the order of a dynamically generated list of clusters is undefined.
- -routingLocations
- Specifies a list of target locations to route requests. Required only if actionType is equal to permit.Each operand in the list follows one of three formats, and can contain a wildcard * value, which matches any value:
With SIP routing rules only, you can alternatively define target clusters through a rule expression. The valid operators are AND, OR, NOT and parenthetical grouping. Format according to the following list:
- cluster=cellName/clusterName
- server=cellName/nodeName/serverName
- module=cellName/applicationName/applicationVersion/moduleName
- cluster=cellName/clusterName
- server=cellName/nodeName/serverName
- modules=cellName/applicationName/applicationVersion/moduleName
- server maintenance mode=true or false
- node maintenance mode=true or false
- protocol=PROTO_VALUE:
- PROTO_SIP = sip
- SIP over TCP
- PROTO_SIPS = sips
- SIP over SSL and TCP
- PROTO_SIPU = sipu
- SIP over UDP
- PROTO_SIPX = sipx
- SIP over XMEM
- -errorcode
- Integer error code to reject request. Required only if actionType is equal to reject.
Return value
Batch mode example usage
- Use Jacl:
$AdminTask changeRoutingRuleAction {-odrname odr -nodename node1 -protocol SIP -priority 0 -multiclusterAction Failover -routingLocations cluster=*/*}- Use Jython string:
AdminTask.changeRoutingRuleAction('[-odrname odr] [-nodename node1] [-protocol SIP] [-priority 0] [-multiclusterAction Failover] [-routingLocations cluster=*/*]')Interactive mode example usage
- Use Jacl:
$AdminTask changeRoutingRuleAction {-interactive}- Use Jython string:
AdminTask.changeRoutingRuleAction ('[-interactive]')
changeRoutingRuleExpression
The changeRoutingRuleExpression command changes a routing policy rule expression.
Required parameters
- -protocol
- Name of the protocol to associate with the rules. (String, required)
- -priority
- Positive integer value representing the priority of the rule. Zero is the highest priority. (String, required)
- -expression
- Specifies the rule expression. The expression must be enclosed in double quotes. (String, required)
Optional parameters
- -odrname
- Name of the ODR to apply the routing policy work class. Required only if modifying an ODR.
- -nodename
- Name of the node on which the ODR resides. Required only if modifying an ODR.
- -clustername
- Name of the cluster to which to apply the rules. Required only if modifying an on demand router cluster.
Return value
Batch mode example usage
- Use Jacl:
$AdminTask changeRoutingRuleExpression {-odrname odr -nodename node1 -protocol SIP -priority 0 -expression "request.method = 'getOperation0'"}- Use Jython string:
AdminTask.changeRoutingRuleExpression('[-odrname odr] [-nodename node1] [-protocol SIP] [-priority 0] [-expression "request.method = 'getOperation0'"]')Interactive mode example usage
- Use Jacl:
$AdminTask changeRoutingRuleExpression {-interactive}- Use Jython string:
AdminTask.changeRoutingRuleExpression ('[-interactive]')
changeRoutingRulePriority
The changeRoutingRulePriority command changes a routing policy rule priority.
Required parameters
- -protocol
- Name of the protocol to associate with the rules. (String, required)
- -priority
- Positive integer value representing the priority of the rule. Zero is the highest priority. (String, required)
- -expression
- Specifies the rule expression. The expression must be enclosed in double quotes. (String, required)
Optional parameters
- -odrname
- Name of the ODR to apply the routing policy work class. Required only if modifying an ODR.
- -nodename
- Name of the node on which the ODR resides. Required only if modifying an ODR.
- -clustername
- Name of the cluster to which to apply the rules. Required only if modifying an on demand router cluster.
Return value
Batch mode example usage
- Use Jacl:
$AdminTask changeRoutingRulePriority {-odrname odr -nodename node1 -protocol SIP -priority 0 -expression "request.method = 'getOperation0'"}- Use Jython string:
AdminTask.changeRoutingRulePriority('[-odrname odr] [-nodename node1] [-protocol SIP] [-priority 0] [-expression "request.method = 'getOperation0'"]')Interactive mode example usage
- Use Jacl:
$AdminTask changeRoutingRulePriority {-interactive}- Use Jython string:
AdminTask.changeRoutingRulePriority ('[-interactive]')
createRoutingRules
The createRoutingRules command creates a routing policy rule list.
Required parameters
- -protocol
- Name of the protocol to associate with the rules. (String, required)
Optional parameters
- -odrname
- Name of the ODR to apply the routing policy work class. Required only if modifying an ODR.
- -nodename
- Name of the node on which the ODR resides. Required only if modifying an ODR.
- -clustername
- Name of the cluster to which to apply the rules. Required only if modifying an on demand router cluster.
Return value
Batch mode example usage
- Use Jacl:
$AdminTask createRoutingRules {-odrname odr -nodename node1 -protocol SIP}- Use Jython string:
AdminTask.createRoutingRules('[-odrname odr] [-nodename node1] [-protocol SIP]')Interactive mode example usage
- Use Jacl:
$AdminTask createRoutingRules {-interactive}- Use Jython string:
AdminTask.createRoutingRules ('[-interactive]')
listRoutingRules
The listRoutingRules deletes a dynamic cluster from the configuration.
Required parameters
- -protocol
- Name of the protocol to associate with the rules. (String, required)
Optional parameters
- -odrname
- Name of the ODR to apply the routing policy work class. Required only if modifying an ODR.
- -nodename
- Name of the node on which the ODR resides. Required only if modifying an ODR.
- -clustername
- Name of the cluster to which to apply the rules. Required only if modifying an on demand router cluster.
Return value
Batch mode example usage
- Use Jacl:
$AdminTask listRoutingRules {-odrname odr -nodename node1 -protocol SIP}- Use Jython string:
AdminTask.listRoutingRules('[-odrname odr] [-nodename node1] [-protocol SIP]')Interactive mode example usage
- Use Jacl:
$AdminTask listRoutingRules {-interactive}- Use Jython string:
AdminTask.listRoutingRules ('[-interactive]')
removeRoutingRule
The removeRoutingRule command removes a routing policy rule.
Required parameters
- -protocol
- Name of the protocol to associate with the rules. (String, required)
- -expression
- Specifies the rule expression. The expression must be enclosed in double quotes. (String, required)
Optional parameters
- -odrname
- Name of the ODR to apply the routing policy work class. Required only if modifying an ODR.
- -nodename
- Name of the node on which the ODR resides. Required only if modifying an ODR.
- -clustername
- Name of the cluster to which to apply the rules. Required only if modifying an on demand router cluster.
Return value
Batch mode example usage
- Use Jacl:
$AdminTask removeRoutingRule {-odrname odr -nodename node1 -protocol SIP -expression "request.method = 'getOperation0'"}- Use Jython string:
AdminTask.removeRoutingRule('[-odrname odr] [-nodename node1] [-protocol SIP] [-expression "request.method = 'getOperation0'"]')Interactive mode example usage
- Use Jacl:
$AdminTask removeRoutingRule {-interactive}- Use Jython string:
AdminTask.removeRoutingRule ('[-interactive]')
Related concepts
Routing policy action types
Overview of request flow prioritization
Related tasks
Configure ODRs
Related reference
Rules for ODR service policy administrative tasks