efa policy community-list update

Update a commulity-list.

Syntax

efa policy community-list update [ --name string | --type { standard | extended } | --rule stringArray | --operation string | --ip string ]

Parameters

--name string
Specifies the name of the community list.
--type { standard | extended }
Specifies the type of community list. Valid options are standard, extended.
--rule stringArray
Specifies the rule in format seq[seq-num], action[permit/deny], std-value[{ 1-4294967295) | (AA:NN, AA and NN is 2 bytes) | internet | local-as | no-export | no-advertise } ] | ext-value[regular expression]
--operation string
Valid options are update-rule, add-device, remove-device.
--ip string
Specifies comma-separated range of device IP addresses. Example: 10.1.1.13,10.1.1.50,10.1.1.101.

Examples

This example configures a community-list on the specified devices.
efa policy community-list update --name stdext1 --type extended
--operation add-device --ip 10.20.246.29-30
+---------------------+---------+--------+-----------+-----------+ 
| Community List Name | Seq num | Action | Std Value | Ext Value | 
+---------------------+---------+--------+-----------+-----------+ 
| stdext1             | 4       | deny   |           | _1000_    | 
+---------------------+---------+--------+-----------+-----------+ 
| stdext1             | 5       | permit |           | _2000_    | 
+---------------------+---------+--------+-----------+-----------+ 
| stdext1             | 7       | deny   |           | _3000_    | 
Community List details 
+--------------+---------+--------+-----------------+ 
|  IP Address  | Result  | Reason | Rollback reason | 
+--------------+---------+--------+-----------------+ 
| 10.20.246.29 | Success |        |                 | 
+--------------+---------+--------+-----------------+ 
| 10.20.246.30 | Success |        |                 | 
+--------------+---------+--------+-----------------+ 
Device Results 
efa policy community-list update –-name std1 –-type standard
–-operation add-device --ip 10.20.63.140-141,10.20.246.29-30
+---------------------+---------+--------+--------------+-----------+ 
| Community List Name | Seq num | Action |  Std Value   | Ext Value | 
+---------------------+---------+--------+--------------+-----------+ 
| std1                | 4       | deny   | local-as     |           | 
+---------------------+---------+--------+--------------+-----------+ 
| std1                | 5       | deny   | no-export    |           | 
+---------------------+---------+--------+--------------+-----------+ 
| std1                | 7       | deny   | no-advertise |           | 
+---------------------+---------+--------+--------------+-----------+ 
Community List details 
+--------------+---------+--------------------------------------------------------------+-----------------+ 
|  IP Address  | Result  |                            Reason                            | Rollback reason | 
+--------------+---------+--------------------------------------------------------------+-----------------+ 
| 10.20.63.140 | Rollback|                                                              |                 | 
+--------------+---------+--------------------------------------------------------------+-----------------+ 
| 10.20.63.141 | Rollback|                                                              |                 | 
+--------------+---------+--------------------------------------------------------------+-----------------+ 
| 10.20.246.29 | Failed  | Reason: For seq 5: netconf rpc [error] '%Error: An IP        |                 | 
|              |         | Community access-list with this name and instance number     |                 | 
|              |         | already exists'; Rollback community list rules from this     |                 | 
|              |         | device.                                                      |                 | 
+--------------+---------+--------------------------------------------------------------+-----------------+ 
| 10.20.246.30 | Failed  | Reason: For seq 4: netconf rpc [error] '%Error: An IP        |                 | 
|              |         | Community access-list with this name and instance number     |                 | 
|              |         | already exists'; Rollback community list rules from this     |                 | 
|              |         | device.                                                      |                 | 
+--------------+---------+--------------------------------------------------------------+-----------------+ 
Device Results

This example removes the community-list from the specified devices.

efa policy community-list update --name comm1 --type standard
--operation remove-device --ip 10.20.63.140-141 
+---------------------+---------+--------+-----------+-----------+ 
| Community List Name | Seq num | Action | Std Value | Ext Value | 
+---------------------+---------+--------+-----------+-----------+ 
| comm1               | 3       | permit | 65:12     |           | 
+---------------------+---------+--------+-----------+-----------+ 
Community List details 
+--------------+---------+--------+-----------------+ 
|  IP Address  | Result  | Reason | Rollback reason | 
+--------------+---------+--------+-----------------+ 
| 10.20.63.140 | Success |        |                 | 
+--------------+---------+--------+-----------------+ 
| 10.20.63.141 | Success |        |                 | 
+--------------+---------+--------+-----------------+ 
Device Results  
This example updates a community-list by updating a rule.
efa policy community-list update --name commExt1 --type extended
--operation update-rule --rule "seq[1],action[permit],ext-value[_30000_]"
+---------------------+---------+--------+ 
| Community List Name | Seq num | Action | 
+---------------------+---------+--------+ 
| commExt1            | 1       | permit | 
+---------------------+---------+--------+ 
Community List details 
+---------------+----------+--------------------------------------------------------------+-----------------+ 
|  IP Address   |  Result  |                            Reason                            | Rollback reason | 
+---------------+----------+--------------------------------------------------------------+-----------------+ 
| 10.139.44.159 | Failed   | Failed to create community list for commExt1 on the device   |                 | 
|               |          | 10.139.44.159. Reason: For seq 1: netconf rpc [error]        |                 | 
|               |          | '%Error: Same filter is already configured with sequence     |                 | 
|               |          | number 30.'                                                  |                 | 
+---------------+----------+--------------------------------------------------------------+-----------------+ 
| 10.139.44.163 | Rollback |                                                              |                 | 
+---------------+----------+--------------------------------------------------------------+-----------------+ 
Device Results
efa policy community-list update –-name comm1 –-type standard
–-operation update-rule –-rule "seq[5],action[permit],std-value[100;no-advertise]" 
+---------------+----------+--------------------------------------------------------------+-----------------+ 
|  IP Address   |  Result  |                            Reason                            | Rollback reason | 
+---------------+----------+--------------------------------------------------------------+-----------------| 
| 10.139.44.159 | Failed   | Failed to create community list for comm1 on the device      |                 | 
|               |          | 10.139.44.159. Reason: For seq 5: netconf rpc [error]        |                 | 
|               |          | '%Error: Same filter is already configured with sequence     |                 | 
|               |          | number 30.'                                                  |                 | 
+---------------+----------+--------------------------------------------------------------+-----------------+ 
| 10.139.44.163 | Rollback |                                                              |                 | 
+---------------+----------+--------------------------------------------------------------+-----------------+ 
Device Results