Guest

Preview Tool

Cisco Bug: CSCvt77011 - Invalid service deploy/update not trapped when REST depXML utilizes element prefix syntax

Last Modified

Jun 01, 2020

Products (1)

  • Cisco Elastic Services Controller

Known Affected Releases

4.4 4.5 5.0 5.1 5.2

Description (partial)

Symptom:
ESC REST NB API calls can be misinterpreted when the REST payload employs element prefix syntax versus element implicit namespace syntax.  The following operation outcomes can differ depending on the syntax employed:

A service update operation (PUT against /v0/deployments/{internal_deployment_id} ) can be interpreted as a service update (element prefix syntax) versus a replace (element implicit namespace). 

A back-to-back service-deploy (POST against /v0/deployments/{internal_deployment_id} ) against the same tenant can be interpreted as a service update (element prefix syntax) versus conflict (element implicit namespace).

Other examples are possible. 

Syntax examples: 

Element prefix syntax -

<esc_datamodel   xmlns:ns2="urn:ietf:params:xml:ns:netconf:notification:1.0" xmlns:ns1="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns3="http://www.cisco.com/esc/esc_notifications" xmlns:ns0="http://www.cisco.com/esc/esc" xmlns="http://www.cisco.com/esc/esc"  >
    <esc:tenants xmlns:esc="http://www.cisco.com/esc/esc">
        <esc:tenant xmlns:esc="http://www.cisco.com/esc/esc" xmlns:types="http://www.cisco.com/esc/esc_types" >
            <esc:name>Tenant-737801</esc:name>
            <esc:deployments xmlns:esc="http://www.cisco.com/esc/esc">
                <esc:deployment xmlns:esc="http://www.cisco.com/esc/esc" xmlns:types="http://www.cisco.com/esc/esc_types" >
                    <esc:name>Deployment-737801</esc:name>
                    <esc:policies xmlns:esc="http://www.cisco.com/esc/esc">
                        <esc:placement_group xmlns:esc="http://www.cisco.com/esc/esc" xmlns:types="http://www.cisco.com/esc/esc_types" >
                            <esc:name>placement-affinity-1</esc:name>
                            <esc:type>affinity</esc:type>
                            <esc:enforcement>strict</esc:enforcement>
                            <esc:vm_group>1-Group</esc:vm_group>
                            <esc:vm_group>2-Group</esc:vm_group>
                            <esc:vm_group>3-Group</esc:vm_group>
                        </esc:placement_group>
                    </esc:policies>


Element implicit namespace syntax -

<?xml version="1.0" encoding="UTF-8" standalone="no"?><esc_datamodel xmlns="http://www.cisco.com/esc/esc" xmlns:ns0="http://www.cisco.com/esc/esc" xmlns:ns1="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns2="urn:ietf:params:xml:ns:netconf:notification:1.0" xmlns:ns3="http://www.cisco.com/esc/esc_notifications">
    <tenants>
        <tenant>
            <name>Tenant-24082</name>
            <deployments>
                <deployment xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="replace">
                    <name>Deployment-24082</name>
                    <policies>
                        <placement_group>
                            <name>placement-affinity-1</name>
                            <type>affinity</type>
                            <enforcement>strict</enforcement>
                            <vm_group>1-Group</vm_group>
                            <vm_group>2-Group</vm_group>
                            <vm_group>3-Group</vm_group>
                        </placement_group>
                    </policies>

Conditions:
Behaviour is specific to the XML syntax used and underlying ESC processing logic.
Bug details contain sensitive information and therefore require a Cisco.com account to be viewed.

Bug Details Include

  • Full Description (including symptoms, conditions and workarounds)
  • Status
  • Severity
  • Known Fixed Releases
  • Related Community Discussions
  • Number of Related Support Cases
Bug information is viewable for customers and partners who have a service contract. Registered users can view up to 200 bugs per month without a service contract.