cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1286
Views
0
Helpful
8
Replies

Operation not supported (FS MGR): InPlace Modify Error:

haoywang
Cisco Employee
Cisco Employee

Hi Experts

I'm trying to update the source match address in a class-map and YDK returned an error

YPYServiceProviderError: Server reported an error while committing change.

  error-type: application

  error-tag: operation-failed

  error-severity: error

  error-path: ns1:policy-manager/ns1:class-maps/ns1:class-map[type = 'traffic' and name = 'flow1_cm']/ns1:name

  error-message: Operation not supported (FS MGR): InPlace Modify Error:

  error-type: application

  error-tag: backend-status-summary

  error-severity: warning

  error-message: QT/SysDB backend failed, non-QT backend passed [read rest of response for details]

The original XML config is:

<class-maps>

    <class-map>

      <type>traffic</type>

      <name>flow1_cm</name>

      <class-map-mode-match-all/>

      <match>

        <source-address-ipv4>

          <address>192.168.1.0</address>

          <netmask>255.255.255.0</netmask>

        </source-address-ipv4>

        <destination-address-ipv4>

          <address>192.168.100.0</address>

          <netmask>255.255.255.0</netmask>

        </destination-address-ipv4>

      </match>

    </class-map>

I changed the 192.168.1.0 to 192.168.2.0 and the error occured. How can I achieve this goal?

8 Replies 8

saalvare
Cisco Employee
Cisco Employee

That error is not locally generated by YDK.  It comes from the router.  If you share your YDK code snippet, I can try reproduce and follow up on the what is causing the router to reject the config.

Hi, the code related is below:

def update_flow():

    policy_manager = PolicyManager()

    class_maps = policy_manager.class_maps

    cm = class_maps.ClassMap()

    cm.name = 'flow1_cm'

    cm.type = ClassMapTypeEnum.traffic

    cm.class_map_mode_match_all = Empty()

    source = cm.match.SourceAddressIpv4()

    source.address = '192.168.2.0'

    source.netmask = '255.255.255.0'

    cm.match.source_address_ipv4.append(source)

    dest = cm.match.DestinationAddressIpv4()

    dest.address = '192.168.100.0'

    dest.netmask = '255.255.255.0'

    cm.match.destination_address_ipv4.append(dest)

    class_maps.class_map.append(cm)

    provider = get_connection()

    update(provider, policy_manager)

    release_connection(provider)

I also tried to delete the PolicyManager.ClassMaps.ClassMap.Match.SourceAddressIpv4 object first and then add a new source address. The delete operation didn't raise an error but the source address is still in the config.

The code is:

def delete_test():

  provider = get_connection()

  p_object = PolicyManager()

  p_result = read(provider, p_object)

   for j in p_result.class_maps.class_map:

   for k in j.match.source_address_ipv4:

   print k.address

  delete(provider, k)

  release_connection(provider)

Can you try deleting the entire match and then adding the new match with the updated src-address?

I believe the problem you may be hitting is that the source address isn't independently updatable.

Cheers,

Einar

I've tried to delete the match object and a new error is raised.

YPYServiceProviderError: Server reported an error while committing change.

  error-type: application

  error-tag: operation-failed

  error-severity: error

  error-path: ns1:policy-manager/ns1:class-maps/ns1:class-map[type = 'traffic' and name = 'flow1_cm']/ns1:name

  error-message: Policy manager does not support this feature: Classmap is empty,if class map no more required please delete class map 'flow1_cm'

  error-type: application

  error-tag: backend-status-summary

  error-severity: warning

  error-message: QT/SysDB backend failed, non-QT backend passed [read rest of response for details]

Looks like I cannot delete the match object

Anton Abik
Level 4
Level 4

Hi,

I tried to do same for my XR boxes and seems it works for me. Can you try to copy paste the code (in attachment) if it runs also for you?

  • The prints just iterate through the class map and print its name, type and source/dest ip addresses/masks
  • The edit_class_map function do the trick with addying IPs to class_map

EDIT: I am running YDK 0.5.3 and the version of my XR is 6.1.2

Hi

Thanks for your response.

I tried to run your script and there is no class-map named test_CM on my XR.

I guess your class-map is match-any and mine is match-all, so the result is different.

Can you show me the config on XR?

An error raised:

Traceback (most recent call last):

  File "/Users/Muyiwhy/Documents/workspace/ydk_bgp/module/ydk_class_maps-test.py", line 40, in <module>

    crud_update = crud.update (provider, policy_configuration)

  File "/Users/Muyiwhy/.virtualenvs/ydk-py/lib/python2.7/site-packages/ydk/services/crud_service.py", line 117, in update

    self._execute_crud_operation_on_provider(provider, entity, 'UPDATE', False)

  File "/Users/Muyiwhy/.virtualenvs/ydk-py/lib/python2.7/site-packages/ydk/services/crud_service.py", line 168, in _execute_crud_operation_on_provider

    operation

  File "/Users/Muyiwhy/.virtualenvs/ydk-py/lib/python2.7/site-packages/ydk/services/service.py", line 36, in execute_payload

    reply = provider.execute(payload, operation)

  File "/Users/Muyiwhy/.virtualenvs/ydk-py/lib/python2.7/site-packages/ydk/providers/netconf_provider.py", line 94, in execute

    return self.sp_instance.execute_operation(payload, operation)

  File "/Users/Muyiwhy/.virtualenvs/ydk-py/lib/python2.7/site-packages/ydk/providers/_provider_plugin.py", line 223, in execute_operation

    return self._handle_rpc_reply(operation, payload, reply.xml)

  File "/Users/Muyiwhy/.virtualenvs/ydk-py/lib/python2.7/site-packages/ydk/providers/_provider_plugin.py", line 242, in _handle_rpc_reply

    self._handle_rpc_ok(optype, payload, reply_str)

  File "/Users/Muyiwhy/.virtualenvs/ydk-py/lib/python2.7/site-packages/ydk/providers/_provider_plugin.py", line 255, in _handle_rpc_ok

    self._handle_commit(payload, reply_str)

  File "/Users/Muyiwhy/.virtualenvs/ydk-py/lib/python2.7/site-packages/ydk/providers/_provider_plugin.py", line 274, in _handle_commit

    raise YPYServiceProviderError(error_code=YPYErrorCode.SERVER_COMMIT_ERR, error_msg=rep)

ydk.errors.YPYServiceProviderError: Server reported an error while committing change.

  error-type: application

  error-tag: operation-failed

  error-severity: error

  error-path: ns1:policy-manager/ns1:class-maps/ns1:class-map[type = 'traffic' and name = 'test_CM']/ns1:name

  error-message: Policy manager does not support this feature: Match all is the only mode supported for match type "destination-address-ipv4" in class-map type "traffic"

  error-type: application

  error-tag: backend-status-summary

  error-severity: warning

  error-message: QT/SysDB backend failed, non-QT backend passed [read rest of response for details]

BTW: I'm using the same YDK and XR version as you.

Anton Abik
Level 4
Level 4

Nope mine is also match-all because you cannot specify match-any for match-source address or destination address. Error message from ASR if you want to configure it like that:

!!% Policy manager does not support this feature: Match all is the only mode supported for match type "source-address-ipv4" in class-map type "traffic"

end

Class map test_CM is my class map I am editing. So use your name in that code. Hopefully it will work. Here is mine config from XR:

RP/0/0/CPU0:TFI-LAB-XRv6.1.2-01#show run class-map

Tue Feb 28 14:18:42.900 UTC

class-map type traffic match-all test_CM

description This is my description

match source-address ipv4 10.0.0.0 255.255.255.0

match source-address ipv4 50.0.0.1 255.255.255.0

match destination-address ipv4 100.0.0.1 255.255.255.0

match destination-address ipv4 20.0.0.0 255.255.255.0

end-class-map

!