Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go fails to process filters on enum and identity leaves and leaf-lists #969

Closed
ygorelik opened this issue Nov 25, 2019 · 1 comment
Closed
Assignees

Comments

@ygorelik
Copy link
Collaborator

Current Behavior

After fixing issue #968 I noticed that YDK-Go still fails to set filters on enum and identity leaves and leaf-lists. This issue appears due to insufficiency of ydk-go infrastructure to set simultaneously value and filter on leaf and leaf-list.

Steps to Reproduce

Execute the following test unit test (currently commented out):

func (suite *NETCONFOperationsTestSuite) TestDeleteLeafList() {
    runnerCreate := ysanity.Runner{}
    runnerCreate.Ytypes.BuiltInT.EnumLlist = append(runnerCreate.Ytypes.BuiltInT.EnumLlist, ysanity.YdkEnumTest_local)
    suite.CRUD.Create(&suite.Provider, &runnerCreate)

    runnerUpdate := ysanity.Runner{}
    runnerUpdate.Ytypes.BuiltInT.EnumLlist = append(runnerUpdate.Ytypes.BuiltInT.EnumLlist, yfilter.Delete)
    suite.CRUD.Update(&suite.Provider, &runnerUpdate)

    // delete again with error
    suite.CRUD.Update(&suite.Provider, &runnerUpdate)
}

The test fails with panic with YModelError:

ygorelik@bionic:~/ydk-gen/sdk/go/core/tests$ go test -run NETCONFOperationsTestSuite/TestDeleteLeafList -v
=== RUN   TestNETCONFOperationsTestSuite
=== RUN   TestNETCONFOperationsTestSuite/TestDeleteLeafList
NETCONFOperationsTestSuite: TestDeleteLeafList ...
--- FAIL: TestNETCONFOperationsTestSuite (0.49s)
    --- FAIL: TestNETCONFOperationsTestSuite/TestDeleteLeafList (0.34s)
    	suite.go:62: test panicked: YModelError: Invalid value "" in "enum-llist" element. Path: /ydktest-sanity:runner/ytypes/built-in-t/enum-llist[.='']

Logs

NETCONFOperationsTestSuite: TestDeleteLeafList ...
[2019-11-24 19:36:56.391] [ydk] [debug] Getting new modules for path 'ydk:create'
[2019-11-24 19:36:56.391] [ydk] [debug] Loading module 'ydk', revision ''
[2019-11-24 19:36:56.391] [ydk] [debug] The module 'ydk' schema has already been populated in YDK repository
[2019-11-24 19:36:56.391] [ydk] [debug] Getting new modules for path 'ydktest-sanity:runner'
[2019-11-24 19:36:56.391] [ydk] [debug] Loading module 'ydktest-sanity', revision ''
[2019-11-24 19:36:56.391] [ydk] [debug] The module 'ydktest-sanity' schema has already been populated in YDK repository
[2019-11-24 19:36:56.391] [ydk] [debug] Enabled feature 'crypto' in 'ydktest-types'
[2019-11-24 19:36:56.391] [ydk] [debug] Enabled feature 'ipv4-non-contiguous-netmasks' in 'ydktest-sanity'
[2019-11-24 19:36:56.391] [ydk] [debug] Enabled feature 'ipv6-privacy-autoconf' in 'ydktest-sanity'
[2019-11-24 19:36:56.391] [ydk] [debug] Looking to populate schemas for 'ydktest-sanity:runner'
[2019-11-24 19:36:56.391] [ydk] [debug] Getting new modules for path 'ydktest-sanity:runner'
[2019-11-24 19:36:56.391] [ydk] [debug] Loading module 'ydktest-sanity', revision ''
[2019-11-24 19:36:56.391] [ydk] [debug] The module 'ydktest-sanity' schema has already been populated in YDK repository
[2019-11-24 19:36:56.391] [ydk] [debug] Enabled feature 'crypto' in 'ydktest-types'
[2019-11-24 19:36:56.391] [ydk] [debug] Enabled feature 'ipv4-non-contiguous-netmasks' in 'ydktest-sanity'
[2019-11-24 19:36:56.391] [ydk] [debug] Enabled feature 'ipv6-privacy-autoconf' in 'ydktest-sanity'
[2019-11-24 19:36:56.391] [ydk] [debug] Creating root data node with path '/ydktest-sanity:runner'
[2019-11-24 19:36:56.391] [ydk] [debug] [Go] path.getDataNodeFromEntity: Created datanode with path 'ydktest-sanity:runner'
[2019-11-24 19:36:56.392] [ydk] [debug] [Go] Got 23 entity children
[2019-11-24 19:36:56.392] [ydk] [debug] [Go] Looking at entity child 'one'
[2019-11-24 19:36:56.392] [ydk] [debug] [Go] Looking at entity child 'two'
[2019-11-24 19:36:56.392] [ydk] [debug] [Go] Looking at entity child 'three'
[2019-11-24 19:36:56.393] [ydk] [debug] [Go] Looking at entity child 'ytypes'
[2019-11-24 19:36:56.393] [ydk] [debug] Populating schema for 'ytypes'
[2019-11-24 19:36:56.393] [ydk] [debug] Looking to populate schemas for 'ytypes'
[2019-11-24 19:36:56.393] [ydk] [debug] Getting new modules for path 'ytypes'
[2019-11-24 19:36:56.393] [ydk] [debug] Creating node 'ytypes' with value ''
[2019-11-24 19:36:56.393] [ydk] [debug] Current path: /ydktest-sanity:runner
[2019-11-24 19:36:56.393] [ydk] [debug] Top container path: ydktest-sanity:runner
[2019-11-24 19:36:56.393] [ydk] [debug] Populating schema for 'ytypes'
[2019-11-24 19:36:56.393] [ydk] [debug] Looking to populate schemas for 'ytypes'
[2019-11-24 19:36:56.393] [ydk] [debug] Getting new modules for path 'ytypes'
[2019-11-24 19:36:56.393] [ydk] [debug] Getting child schema with path 'ytypes' in /ydktest-sanity:runner
[2019-11-24 19:36:56.393] [ydk] [debug] Getting data nodes with path 'ytypes'
[2019-11-24 19:36:56.393] [ydk] [debug] Creating new data path 'ytypes' with value '' in 'runner'
[2019-11-24 19:36:56.393] [ydk] [debug] [Go] path.populateDataNode: Populating leafs in datanode with path 'ydktest-sanity:runner/ytypes'
[2019-11-24 19:36:56.393] [ydk] [debug] [Go] Got 3 entity children
[2019-11-24 19:36:56.393] [ydk] [debug] [Go] Looking at entity child 'none'
[2019-11-24 19:36:56.394] [ydk] [debug] [Go] Looking at entity child 'built-in-t'
[2019-11-24 19:36:56.394] [ydk] [debug] Populating schema for 'built-in-t'
[2019-11-24 19:36:56.394] [ydk] [debug] Looking to populate schemas for 'built-in-t'
[2019-11-24 19:36:56.394] [ydk] [debug] Getting new modules for path 'built-in-t'
[2019-11-24 19:36:56.394] [ydk] [debug] Creating node 'built-in-t' with value ''
[2019-11-24 19:36:56.394] [ydk] [debug] Current path: /ydktest-sanity:runner/ytypes
[2019-11-24 19:36:56.394] [ydk] [debug] Top container path: ydktest-sanity:runner
[2019-11-24 19:36:56.394] [ydk] [debug] Populating schema for 'built-in-t'
[2019-11-24 19:36:56.394] [ydk] [debug] Looking to populate schemas for 'built-in-t'
[2019-11-24 19:36:56.394] [ydk] [debug] Getting new modules for path 'built-in-t'
[2019-11-24 19:36:56.394] [ydk] [debug] Getting child schema with path 'built-in-t' in /ydktest-sanity:runner/ytypes
[2019-11-24 19:36:56.394] [ydk] [debug] Getting data nodes with path 'built-in-t'
[2019-11-24 19:36:56.394] [ydk] [debug] Creating new data path 'built-in-t' with value '' in 'ytypes'
[2019-11-24 19:36:56.394] [ydk] [debug] [Go] path.populateDataNode: Populating leafs in datanode with path 'ydktest-sanity:runner/ytypes/built-in-t'
[2019-11-24 19:36:56.394] [ydk] [debug] [Go] path.populateNameValues: Got leaf {enum-llist[.="local"]: }
[2019-11-24 19:36:56.394] [ydk] [debug] Populating schema for 'enum-llist[.="local"]'
[2019-11-24 19:36:56.394] [ydk] [debug] Looking to populate schemas for 'enum-llist[.="local"]'
[2019-11-24 19:36:56.394] [ydk] [debug] Getting new modules for path 'enum-llist[.="local"]'
[2019-11-24 19:36:56.394] [ydk] [debug] Creating node 'enum-llist[.="local"]' with value ''
[2019-11-24 19:36:56.394] [ydk] [debug] Current path: /ydktest-sanity:runner/ytypes/built-in-t
[2019-11-24 19:36:56.394] [ydk] [debug] Top container path: ydktest-sanity:runner
[2019-11-24 19:36:56.395] [ydk] [debug] Populating schema for 'enum-llist[.="local"]'
[2019-11-24 19:36:56.395] [ydk] [debug] Looking to populate schemas for 'enum-llist[.="local"]'
[2019-11-24 19:36:56.395] [ydk] [debug] Getting new modules for path 'enum-llist[.="local"]'
[2019-11-24 19:36:56.395] [ydk] [debug] Getting child schema with path 'enum-llist[.="local"]' in /ydktest-sanity:runner/ytypes/built-in-t
[2019-11-24 19:36:56.395] [ydk] [debug] Getting data nodes with path 'enum-llist[.="local"]'
[2019-11-24 19:36:56.395] [ydk] [debug] Creating new data path 'enum-llist[.="local"]' with value '' in 'built-in-t'
[2019-11-24 19:36:56.395] [ydk] [debug] [Go] Got 0 entity children
[2019-11-24 19:36:56.395] [ydk] [debug] [Go] 
[2019-11-24 19:36:56.395] [ydk] [debug] [Go] Looking at entity child 'derived-t'
[2019-11-24 19:36:56.395] [ydk] [debug] [Go] 
[2019-11-24 19:36:56.395] [ydk] [debug] [Go] Looking at entity child 'one-list'
[2019-11-24 19:36:56.395] [ydk] [debug] [Go] Looking at entity child 'two-list'
[2019-11-24 19:36:56.395] [ydk] [debug] [Go] Looking at entity child 'three-list'
[2019-11-24 19:36:56.395] [ydk] [debug] [Go] Looking at entity child 'inbtw-list'
[2019-11-24 19:36:56.396] [ydk] [debug] [Go] Looking at entity child 'leaf-ref'
[2019-11-24 19:36:56.396] [ydk] [debug] [Go] Looking at entity child 'not-supported-1'
[2019-11-24 19:36:56.396] [ydk] [debug] [Go] Looking at entity child 'one-read-only'
[2019-11-24 19:36:56.396] [ydk] [debug] [Go] Looking at entity child 'mtus'
[2019-11-24 19:36:56.396] [ydk] [debug] [Go] Looking at entity child 'outer'
[2019-11-24 19:36:56.397] [ydk] [debug] [Go] Looking at entity child 'runner-2'
[2019-11-24 19:36:56.397] [ydk] [debug] [Go] Looking at entity child 'ydktest-sanity-augm:one'
[2019-11-24 19:36:56.397] [ydk] [debug] [Go] 
[2019-11-24 19:36:56.397] [ydk] [debug] ydk::path::Codec: Encoding data node '/' to XML formated string
[2019-11-24 19:36:56.398] [ydk] [debug] ydk::path::Codec: Encoding data node '/ydktest-sanity:runner' to XML formated string
[2019-11-24 19:36:56.398] [ydk] [debug] Populating schema for 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Looking to populate schemas for 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Populating schema for '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity"><ytypes><built-in-t><enum-llist>local</enum-llist></built-in-t></ytypes></runner>'
[2019-11-24 19:36:56.398] [ydk] [debug] Looking to populate schemas for '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity"><ytypes><built-in-t><enum-llist>local</enum-llist></built-in-t></ytypes></runner>'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity"><ytypes><built-in-t><enum-llist>local</enum-llist></built-in-t></ytypes></runner>'
[2019-11-24 19:36:56.398] [ydk] [debug] Creating node 'entity' with value '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity"><ytypes><built-in-t><enum-llist>local</enum-llist></built-in-t></ytypes></runner>'
[2019-11-24 19:36:56.398] [ydk] [debug] Current path: /ydk:create
[2019-11-24 19:36:56.398] [ydk] [debug] Top container path: ydk:create
[2019-11-24 19:36:56.398] [ydk] [debug] Populating schema for 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Looking to populate schemas for 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting child schema with path 'entity' in /ydk:create
[2019-11-24 19:36:56.398] [ydk] [debug] Getting data nodes with path 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Creating new data path 'entity' with value '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity"><ytypes><built-in-t><enum-llist>local</enum-llist></built-in-t></ytypes></runner>' in 'create'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'ydk:create'
[2019-11-24 19:36:56.398] [ydk] [debug] Loading module 'ydk', revision ''
[2019-11-24 19:36:56.398] [ydk] [debug] The module 'ydk' schema has already been populated in YDK repository
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'ydk:read'
[2019-11-24 19:36:56.398] [ydk] [debug] Loading module 'ydk', revision ''
[2019-11-24 19:36:56.398] [ydk] [debug] The module 'ydk' schema has already been populated in YDK repository
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'ydk:update'
[2019-11-24 19:36:56.398] [ydk] [debug] Loading module 'ydk', revision ''
[2019-11-24 19:36:56.398] [ydk] [debug] The module 'ydk' schema has already been populated in YDK repository
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'ydk:delete'
[2019-11-24 19:36:56.398] [ydk] [debug] Loading module 'ydk', revision ''
[2019-11-24 19:36:56.398] [ydk] [debug] The module 'ydk' schema has already been populated in YDK repository
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'ietf-netconf:edit-config'
[2019-11-24 19:36:56.398] [ydk] [debug] Loading module 'ietf-netconf', revision ''
[2019-11-24 19:36:56.398] [ydk] [debug] The module 'ietf-netconf' schema has already been populated in YDK repository
[2019-11-24 19:36:56.398] [ydk] [debug] Populating schema for 'target/candidate'
[2019-11-24 19:36:56.398] [ydk] [debug] Looking to populate schemas for 'target/candidate'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'target/candidate'
[2019-11-24 19:36:56.398] [ydk] [debug] Creating node 'target/candidate' with value ''
[2019-11-24 19:36:56.398] [ydk] [debug] Current path: /ietf-netconf:edit-config
[2019-11-24 19:36:56.398] [ydk] [debug] Top container path: ietf-netconf:edit-config
[2019-11-24 19:36:56.398] [ydk] [debug] Populating schema for 'target'
[2019-11-24 19:36:56.398] [ydk] [debug] Looking to populate schemas for 'target'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'target'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting child schema with path 'target' in /ietf-netconf:edit-config
[2019-11-24 19:36:56.398] [ydk] [debug] Getting data nodes with path 'target'
[2019-11-24 19:36:56.398] [ydk] [debug] Creating new data path 'target' in 'edit-config'
[2019-11-24 19:36:56.398] [ydk] [debug] Creating new data path 'candidate' with value '' in 'target'
[2019-11-24 19:36:56.398] [ydk] [debug] Populating schema for 'error-option'
[2019-11-24 19:36:56.398] [ydk] [debug] Looking to populate schemas for 'error-option'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'error-option'
[2019-11-24 19:36:56.398] [ydk] [debug] Populating schema for 'rollback-on-error'
[2019-11-24 19:36:56.398] [ydk] [debug] Looking to populate schemas for 'rollback-on-error'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'rollback-on-error'
[2019-11-24 19:36:56.398] [ydk] [debug] Creating node 'error-option' with value 'rollback-on-error'
[2019-11-24 19:36:56.398] [ydk] [debug] Current path: /ietf-netconf:edit-config
[2019-11-24 19:36:56.398] [ydk] [debug] Top container path: ietf-netconf:edit-config
[2019-11-24 19:36:56.398] [ydk] [debug] Populating schema for 'error-option'
[2019-11-24 19:36:56.398] [ydk] [debug] Looking to populate schemas for 'error-option'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'error-option'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting child schema with path 'error-option' in /ietf-netconf:edit-config
[2019-11-24 19:36:56.398] [ydk] [debug] Getting data nodes with path 'error-option'
[2019-11-24 19:36:56.398] [ydk] [debug] Creating new data path 'error-option' with value 'rollback-on-error' in 'edit-config'
[2019-11-24 19:36:56.398] [ydk] [debug] Populating schema for 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Looking to populate schemas for 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting new modules for path 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] Getting child schema with path 'entity' in /ydk:create
[2019-11-24 19:36:56.398] [ydk] [debug] Getting data nodes with path 'entity'
[2019-11-24 19:36:56.398] [ydk] [debug] ydk::path::Codec: Decoding from XML formatted payload:
<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity"><ytypes><built-in-t><enum-llist>local</enum-llist></built-in-t></ytypes></runner>
[2019-11-24 19:36:56.398] [ydk] [debug] Populating new schema from payload:
<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity"><ytypes><built-in-t><enum-llist>local</enum-llist></built-in-t></ytypes></runner>
[2019-11-24 19:36:56.398] [ydk] [debug] Extracting module namespaces from XML payload
[2019-11-24 19:36:56.399] [ydk] [debug] Loading module 'ydktest-sanity', revision ''
[2019-11-24 19:36:56.399] [ydk] [debug] The module 'ydktest-sanity' schema has already been populated in YDK repository
[2019-11-24 19:36:56.399] [ydk] [debug] Enabled feature 'crypto' in 'ydktest-types'
[2019-11-24 19:36:56.399] [ydk] [debug] Enabled feature 'ipv4-non-contiguous-netmasks' in 'ydktest-sanity'
[2019-11-24 19:36:56.399] [ydk] [debug] Enabled feature 'ipv6-privacy-autoconf' in 'ydktest-sanity'
[2019-11-24 19:36:56.399] [ydk] [debug] Performing decode operation
[2019-11-24 19:36:56.399] [ydk] [debug] Adding annotation 'ietf-netconf:operation' = merge to /ydktest-sanity:runner
[2019-11-24 19:36:56.399] [ydk] [debug] ydk::path::Codec: Encoding data node '/ydktest-sanity:runner' to XML formated string
[2019-11-24 19:36:56.399] [ydk] [debug] Populating schema for 'config'
[2019-11-24 19:36:56.399] [ydk] [debug] Looking to populate schemas for 'config'
[2019-11-24 19:36:56.399] [ydk] [debug] Getting new modules for path 'config'
[2019-11-24 19:36:56.399] [ydk] [debug] Populating schema for '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
  <ytypes>
    <built-in-t>
      <enum-llist>local</enum-llist>
    </built-in-t>
  </ytypes>
</runner>
'
[2019-11-24 19:36:56.399] [ydk] [debug] Looking to populate schemas for '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
  <ytypes>
    <built-in-t>
      <enum-llist>local</enum-llist>
    </built-in-t>
  </ytypes>
</runner>
'
[2019-11-24 19:36:56.399] [ydk] [debug] Getting new modules for path '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
  <ytypes>
    <built-in-t>
      <enum-llist>local</enum-llist>
    </built-in-t>
  </ytypes>
</runner>
'
[2019-11-24 19:36:56.399] [ydk] [debug] Creating node 'config' with value '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
  <ytypes>
    <built-in-t>
      <enum-llist>local</enum-llist>
    </built-in-t>
  </ytypes>
</runner>
'
[2019-11-24 19:36:56.399] [ydk] [debug] Current path: /ietf-netconf:edit-config
[2019-11-24 19:36:56.399] [ydk] [debug] Top container path: ietf-netconf:edit-config
[2019-11-24 19:36:56.399] [ydk] [debug] Populating schema for 'config'
[2019-11-24 19:36:56.399] [ydk] [debug] Looking to populate schemas for 'config'
[2019-11-24 19:36:56.399] [ydk] [debug] Getting new modules for path 'config'
[2019-11-24 19:36:56.399] [ydk] [debug] Getting child schema with path 'config' in /ietf-netconf:edit-config
[2019-11-24 19:36:56.399] [ydk] [debug] Getting data nodes with path 'config'
[2019-11-24 19:36:56.399] [ydk] [debug] Creating new data path 'config' with value '<runner xmlns="http://cisco.com/ns/yang/ydktest-sanity" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
  <ytypes>
    <built-in-t>
      <enum-llist>local</enum-llist>
    </built-in-t>
  </ytypes>
</runner>
' in 'edit-config'
[2019-11-24 19:36:56.399] [ydk] [debug] ydk::path::Codec: Encoding data node '/ietf-netconf:edit-config' to XML formated string
[2019-11-24 19:36:56.399] [ydk] [info] ============= Sending RPC to device =============
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <target>
    <candidate/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config><runner xmlns="http://cisco.com/ns/yang/ydktest-sanity" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
  <ytypes>
    <built-in-t>
      <enum-llist>local</enum-llist>
    </built-in-t>
  </ytypes>
</runner>
</config>
</edit-config>
</rpc>
[2019-11-24 19:36:56.399] [ydk] [debug] NetconfSSHClient: NC session status: 1
[2019-11-24 19:36:56.399] [ydk] [debug] Trace: Missing message-id in rpc.
[2019-11-24 19:36:56.399] [ydk] [debug] Netconf SSH Client: sending RPC
[2019-11-24 19:36:56.399] [ydk] [debug] Trace: Writing message (session 749): 
<?xml version="1.0"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4">
  <edit-config>
    <target>
      <candidate/>
    </target>
    <error-option>rollback-on-error</error-option>
    <config>
      <runner xmlns="http://cisco.com/ns/yang/ydktest-sanity" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
        <ytypes>
          <built-in-t>
            <enum-llist>local</enum-llist>
          </built-in-t>
        </ytypes>
      </runner>
    </config>
  </edit-config>
</rpc>

[2019-11-24 19:36:56.399] [ydk] [debug] NetconfSSHClient: NC session status: 1
[2019-11-24 19:36:56.399] [ydk] [debug] Netconf SSH Client: receiving reply RPC
[2019-11-24 19:36:56.462] [ydk] [debug] Trace: Received message (session 749): 
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4"><ok/></rpc-reply>
[2019-11-24 19:36:56.462] [ydk] [debug] Netconf SSH Client: processing reply
[2019-11-24 19:36:56.462] [ydk] [info] ============= Received RPC from device =============
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4">
  <ok/>
</rpc-reply>

[2019-11-24 19:36:56.462] [ydk] [info] ============= Executing commit =============
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <commit/>
</rpc>

[2019-11-24 19:36:56.462] [ydk] [debug] NetconfSSHClient: NC session status: 1
[2019-11-24 19:36:56.462] [ydk] [debug] Trace: Missing message-id in rpc.
[2019-11-24 19:36:56.462] [ydk] [debug] Netconf SSH Client: sending RPC
[2019-11-24 19:36:56.462] [ydk] [debug] Trace: Writing message (session 749): 
<?xml version="1.0"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5">
  <commit/>
</rpc>

[2019-11-24 19:36:56.462] [ydk] [debug] NetconfSSHClient: NC session status: 1
[2019-11-24 19:36:56.462] [ydk] [debug] Netconf SSH Client: receiving reply RPC
[2019-11-24 19:36:56.593] [ydk] [debug] Trace: Received message (session 749): 
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5"><ok/></rpc-reply>
[2019-11-24 19:36:56.594] [ydk] [debug] Netconf SSH Client: processing reply
[2019-11-24 19:36:56.594] [ydk] [info] ============= RPC received from device =============
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5">
  <ok/>
</rpc-reply>

[2019-11-24 19:36:56.594] [ydk] [debug] Getting new modules for path 'ydk:update'
[2019-11-24 19:36:56.594] [ydk] [debug] Loading module 'ydk', revision ''
[2019-11-24 19:36:56.594] [ydk] [debug] The module 'ydk' schema has already been populated in YDK repository
[2019-11-24 19:36:56.594] [ydk] [debug] Getting new modules for path 'ydktest-sanity:runner'
[2019-11-24 19:36:56.594] [ydk] [debug] Loading module 'ydktest-sanity', revision ''
[2019-11-24 19:36:56.594] [ydk] [debug] The module 'ydktest-sanity' schema has already been populated in YDK repository
[2019-11-24 19:36:56.594] [ydk] [debug] Enabled feature 'crypto' in 'ydktest-types'
[2019-11-24 19:36:56.594] [ydk] [debug] Enabled feature 'ipv4-non-contiguous-netmasks' in 'ydktest-sanity'
[2019-11-24 19:36:56.594] [ydk] [debug] Enabled feature 'ipv6-privacy-autoconf' in 'ydktest-sanity'
[2019-11-24 19:36:56.594] [ydk] [debug] Looking to populate schemas for 'ydktest-sanity:runner'
[2019-11-24 19:36:56.594] [ydk] [debug] Getting new modules for path 'ydktest-sanity:runner'
[2019-11-24 19:36:56.594] [ydk] [debug] Loading module 'ydktest-sanity', revision ''
[2019-11-24 19:36:56.594] [ydk] [debug] The module 'ydktest-sanity' schema has already been populated in YDK repository
[2019-11-24 19:36:56.594] [ydk] [debug] Enabled feature 'crypto' in 'ydktest-types'
[2019-11-24 19:36:56.594] [ydk] [debug] Enabled feature 'ipv4-non-contiguous-netmasks' in 'ydktest-sanity'
[2019-11-24 19:36:56.594] [ydk] [debug] Enabled feature 'ipv6-privacy-autoconf' in 'ydktest-sanity'
[2019-11-24 19:36:56.594] [ydk] [debug] Creating root data node with path '/ydktest-sanity:runner'
[2019-11-24 19:36:56.594] [ydk] [debug] [Go] path.getDataNodeFromEntity: Created datanode with path 'ydktest-sanity:runner'
[2019-11-24 19:36:56.595] [ydk] [debug] [Go] Got 23 entity children
[2019-11-24 19:36:56.595] [ydk] [debug] [Go] Looking at entity child 'one'
[2019-11-24 19:36:56.595] [ydk] [debug] [Go] Looking at entity child 'two'
[2019-11-24 19:36:56.595] [ydk] [debug] [Go] Looking at entity child 'three'
[2019-11-24 19:36:56.595] [ydk] [debug] [Go] Looking at entity child 'ytypes'
[2019-11-24 19:36:56.595] [ydk] [debug] Populating schema for 'ytypes'
[2019-11-24 19:36:56.595] [ydk] [debug] Looking to populate schemas for 'ytypes'
[2019-11-24 19:36:56.595] [ydk] [debug] Getting new modules for path 'ytypes'
[2019-11-24 19:36:56.595] [ydk] [debug] Creating node 'ytypes' with value ''
[2019-11-24 19:36:56.595] [ydk] [debug] Current path: /ydktest-sanity:runner
[2019-11-24 19:36:56.595] [ydk] [debug] Top container path: ydktest-sanity:runner
[2019-11-24 19:36:56.595] [ydk] [debug] Populating schema for 'ytypes'
[2019-11-24 19:36:56.595] [ydk] [debug] Looking to populate schemas for 'ytypes'
[2019-11-24 19:36:56.595] [ydk] [debug] Getting new modules for path 'ytypes'
[2019-11-24 19:36:56.595] [ydk] [debug] Getting child schema with path 'ytypes' in /ydktest-sanity:runner
[2019-11-24 19:36:56.595] [ydk] [debug] Getting data nodes with path 'ytypes'
[2019-11-24 19:36:56.595] [ydk] [debug] Creating new data path 'ytypes' with value '' in 'runner'
[2019-11-24 19:36:56.595] [ydk] [debug] [Go] path.populateDataNode: Populating leafs in datanode with path 'ydktest-sanity:runner/ytypes'
[2019-11-24 19:36:56.595] [ydk] [debug] [Go] Got 3 entity children
[2019-11-24 19:36:56.595] [ydk] [debug] [Go] Looking at entity child 'none'
[2019-11-24 19:36:56.595] [ydk] [debug] [Go] Looking at entity child 'built-in-t'
[2019-11-24 19:36:56.595] [ydk] [debug] Populating schema for 'built-in-t'
[2019-11-24 19:36:56.595] [ydk] [debug] Looking to populate schemas for 'built-in-t'
[2019-11-24 19:36:56.595] [ydk] [debug] Getting new modules for path 'built-in-t'
[2019-11-24 19:36:56.595] [ydk] [debug] Creating node 'built-in-t' with value ''
[2019-11-24 19:36:56.596] [ydk] [debug] Current path: /ydktest-sanity:runner/ytypes
[2019-11-24 19:36:56.596] [ydk] [debug] Top container path: ydktest-sanity:runner
[2019-11-24 19:36:56.596] [ydk] [debug] Populating schema for 'built-in-t'
[2019-11-24 19:36:56.596] [ydk] [debug] Looking to populate schemas for 'built-in-t'
[2019-11-24 19:36:56.596] [ydk] [debug] Getting new modules for path 'built-in-t'
[2019-11-24 19:36:56.596] [ydk] [debug] Getting child schema with path 'built-in-t' in /ydktest-sanity:runner/ytypes
[2019-11-24 19:36:56.596] [ydk] [debug] Getting data nodes with path 'built-in-t'
[2019-11-24 19:36:56.596] [ydk] [debug] Creating new data path 'built-in-t' with value '' in 'ytypes'
[2019-11-24 19:36:56.596] [ydk] [debug] [Go] path.populateDataNode: Populating leafs in datanode with path 'ydktest-sanity:runner/ytypes/built-in-t'
[2019-11-24 19:36:56.596] [ydk] [debug] [Go] path.populateNameValues: Got leaf {enum-llist: }
[2019-11-24 19:36:56.596] [ydk] [debug] Populating schema for 'enum-llist'
[2019-11-24 19:36:56.596] [ydk] [debug] Looking to populate schemas for 'enum-llist'
[2019-11-24 19:36:56.596] [ydk] [debug] Getting new modules for path 'enum-llist'
[2019-11-24 19:36:56.596] [ydk] [debug] Creating node 'enum-llist' with value ''
[2019-11-24 19:36:56.596] [ydk] [debug] Current path: /ydktest-sanity:runner/ytypes/built-in-t
[2019-11-24 19:36:56.596] [ydk] [debug] Top container path: ydktest-sanity:runner
[2019-11-24 19:36:56.596] [ydk] [debug] Populating schema for 'enum-llist'
[2019-11-24 19:36:56.596] [ydk] [debug] Looking to populate schemas for 'enum-llist'
[2019-11-24 19:36:56.596] [ydk] [debug] Getting new modules for path 'enum-llist'
[2019-11-24 19:36:56.596] [ydk] [debug] Getting child schema with path 'enum-llist' in /ydktest-sanity:runner/ytypes/built-in-t
[2019-11-24 19:36:56.596] [ydk] [debug] Getting data nodes with path 'enum-llist'
[2019-11-24 19:36:56.596] [ydk] [debug] Creating new data path 'enum-llist' with value '' in 'built-in-t'
[2019-11-24 19:36:56.596] [ydk] [error] Data is invalid according to the yang model. Libyang error: Invalid value "" in "enum-llist" element. Path: '/ydktest-sanity:runner/ytypes/built-in-t/enum-llist[.='']'
[2019-11-24 19:36:56.596] [ydk] [info] Disconnected from device
[2019-11-24 19:36:56.598] [ydk] [debug] Trace: Writing message (session 749): 
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="6">
  <close-session/>
</rpc>

[2019-11-24 19:36:56.600] [ydk] [debug] Trace: Received message (session 749): 
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="6"><ok/></rpc-reply>
--- FAIL: TestNETCONFOperationsTestSuite (0.57s)
    --- FAIL: TestNETCONFOperationsTestSuite/TestDeleteLeafList (0.43s)
    	suite.go:62: test panicked: YModelError: Invalid value "" in "enum-llist" element. Path: /ydktest-sanity:runner/ytypes/built-in-t/enum-llist[.='']
    		goroutine 4 [running]:
    		runtime/debug.Stack(0xc420301098, 0xe52fe0, 0xc4200a11d0)
    			/usr/lib/go/src/runtime/debug/stack.go:24 +0xa7
    		github.com/stretchr/testify/suite.failOnPanic(0xc42018a000)
    			/home/ygorelik/go/src/github.com/stretchr/testify/suite/suite.go:62 +0x60
    		panic(0xe52fe0, 0xc4200a11d0)
    			/usr/lib/go/src/runtime/panic.go:502 +0x229
    		github.com/CiscoDevNet/ydk-go/ydk/path.PanicOnCStateError(0xc420301218)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/path/path.go:1111 +0xc0
    		github.com/CiscoDevNet/ydk-go/ydk/path.populateNameValues(0xc4200c6358, 0x1a2f950, 0xf12f67, 0xa, 0xc420247a40, 0x1, 0x1)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/path/path.go:961 +0x2fe
    		github.com/CiscoDevNet/ydk-go/ydk/path.populateDataNode(0xc4200c6358, 0xf7c9a0, 0xc4202f4838, 0x1a307f0)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/path/path.go:944 +0x30d
    		github.com/CiscoDevNet/ydk-go/ydk/path.walkChildren(0xc4200c6358, 0xf7c980, 0xc4202f46a8, 0x1a307f0)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/path/path.go:916 +0x252
    		github.com/CiscoDevNet/ydk-go/ydk/path.populateDataNode(0xc4200c6358, 0xf7c980, 0xc4202f46a8, 0x1a2fc50)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/path/path.go:945 +0x342
    		github.com/CiscoDevNet/ydk-go/ydk/path.walkChildren(0xc4200c6358, 0xf7c2e0, 0xc4202f4000, 0x1a2fc50)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/path/path.go:916 +0x252
    		github.com/CiscoDevNet/ydk-go/ydk/path.getDataNodeFromEntity(0xc4200c6358, 0xf7c2e0, 0xc4202f4000, 0x7f1800062fe0, 0x0)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/path/path.go:899 +0x38f
    		github.com/CiscoDevNet/ydk-go/ydk/path.GetDataPayload(0xc4200c6358, 0xf7c2e0, 0xc4202f4000, 0x7f1800062fe0, 0xf80a40, 0xc4200c62d8, 0x0)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/path/path.go:115 +0x1f5
    		github.com/CiscoDevNet/ydk-go/ydk/path.ExecuteRPC(0xf80a40, 0xc4200c62d8, 0xf131bf, 0xa, 0xc4203018e8, 0x0, 0x0, 0x0)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/path/path.go:85 +0x39a
    		github.com/CiscoDevNet/ydk-go/ydk/providers.executeNetconfRpc(0xf80a40, 0xc4200c62d8, 0xf1164c, 0x6, 0xf7c2e0, 0xc4202f4000, 0xc420246330, 0xee44c0, 0xc420246330)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/providers/providers.go:206 +0x22c
    		github.com/CiscoDevNet/ydk-go/ydk/providers.(*NetconfServiceProvider).ExecuteRpc(0xc4200c62d8, 0xf1164c, 0x6, 0xf7c2e0, 0xc4202f4000, 0xc420246330, 0xc4200a0b80, 0xc4202f4000)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/providers/providers.go:212 +0x70
    		github.com/CiscoDevNet/ydk-go/ydk/services.(*CrudService).Update(0xc4200c6368, 0xf80a40, 0xc4200c62d8, 0xf7c2e0, 0xc4202f4000, 0xc4200a0b80)
    			/home/ygorelik/go/src/github.com/CiscoDevNet/ydk-go/ydk/services/services.go:61 +0x68
    		_/home/ygorelik/ydk-gen/sdk/go/core/tests.(*NETCONFOperationsTestSuite).TestDeleteLeafList(0xc4200c62c0)
    			/home/ygorelik/ydk-gen/sdk/go/core/tests/netconf_op_test.go:192 +0x193
    		reflect.Value.call(0xc42043d860, 0xc4200ae458, 0x13, 0xf107f7, 0x4, 0xc420301f80, 0x1, 0x1, 0xc420301ec8, 0xf0a740, ...)
    			/usr/lib/go/src/reflect/value.go:447 +0x969
    		reflect.Value.Call(0xc42043d860, 0xc4200ae458, 0x13, 0xc420301f80, 0x1, 0x1, 0xe27764, 0x12, 0x0)
    			/usr/lib/go/src/reflect/value.go:308 +0xa4
    		github.com/stretchr/testify/suite.Run.func2(0xc42018a000)
    			/home/ygorelik/go/src/github.com/stretchr/testify/suite/suite.go:133 +0x270
    		testing.tRunner(0xc42018a000, 0xc420174e80)
    			/usr/lib/go/src/testing/testing.go:777 +0xd0
    		created by testing.(*T).Run
    			/usr/lib/go/src/testing/testing.go:824 +0x2e0
FAIL
exit status 1
FAIL	_/home/ygorelik/ydk-gen/sdk/go/core/tests	0.591s

System Information

YDK-Go - 0.8.4

@ygorelik
Copy link
Collaborator Author

ygorelik commented Jun 1, 2020

Fixed in this commit.
Added new unit tests, which demonstrate how to handle YFilter operations on leafs and leaf-lists of numbers, enum, and identity. In these cases we cannot have empty value of the leaf and just assign YFilter, because it is not valid value. In the solution the application must provide both value and YFilter for the leaf to avoid Libyang validation errors. For this purpose the YDK type types.LeafData is used:

type LeafData struct {
	Value  string            // Valid string representation of the leaf value
	Filter yfilter.YFilter   // YFilter defining operation on the leaf
	IsSet  bool              // Set to 'true', when Value is set
}

Unit test for numeric leaf:

func (suite *NETCONFOperationsTestSuite) TestDeleteLeaf() {
	runnerCreate := ysanity.Runner{}
	runnerCreate.Ytypes.BuiltInT.Number8 = 10
	suite.CRUD.Create(&suite.Provider, &runnerCreate)

	runnerUpdate := ysanity.Runner{}
	// Need provide value for numbers to avoid YModelError
	// Use LeafData type for the complex leaf data structure
	runnerUpdate.Ytypes.BuiltInT.Number8 = types.LeafData{Value: "10", Filter: yfilter.Delete}
	suite.CRUD.Update(&suite.Provider, &runnerUpdate)

	// delete leaf again raises YServiceProviderError, meaning the leaf has already been deleted
	assert.Panicsf(suite.T(), func() { suite.CRUD.Update(&suite.Provider, &runnerUpdate) },
		"Did not receive OK reply from the device", "formatted")
}

Unit test for enum leaf-list:

func (suite *NETCONFOperationsTestSuite) TestDeleteEnumLeafList() {
	runnerCreate := ysanity.Runner{}
	runnerCreate.Ytypes.BuiltInT.EnumLlist = append(runnerCreate.Ytypes.BuiltInT.EnumLlist, ysanity.YdkEnumTest_local)
	suite.CRUD.Create(&suite.Provider, &runnerCreate)

	runnerUpdate := ysanity.Runner{}
	// Need provide value for enum leaf to avoid YModelError
	deleteValue := types.LeafData{Value: "local", Filter: yfilter.Delete}
	runnerUpdate.Ytypes.BuiltInT.EnumLlist = append(runnerUpdate.Ytypes.BuiltInT.EnumLlist, deleteValue)
	suite.CRUD.Update(&suite.Provider, &runnerUpdate)

	// delete again with error; that proves that the leaf-list has been already deleted
	assert.Panicsf(suite.T(), func() { suite.CRUD.Update(&suite.Provider, &runnerUpdate) },
		"Did not receive OK reply from the device", "formatted")
}

Unit test for identity leaf-list:

func (suite *NETCONFOperationsTestSuite) TestDeleteIdentityLeafList() {
	runnerCreate := ysanity.Runner{}
	runnerCreate.Ytypes.BuiltInT.IdentityLlist =
		append(runnerCreate.Ytypes.BuiltInT.IdentityLlist,  ysanity.ChildIdentity{})
	runnerCreate.Ytypes.BuiltInT.IdentityLlist =
		append(runnerCreate.Ytypes.BuiltInT.IdentityLlist,  ysanity.ChildChildIdentity{})
	suite.CRUD.Create(&suite.Provider, &runnerCreate)

	readEntity := suite.CRUD.ReadConfig(&suite.Provider, &ysanity.Runner{})
	suite.NotNil(readEntity)
	readRunner := readEntity.(*ysanity.Runner)
	suite.Equal(2, len(readRunner.Ytypes.BuiltInT.IdentityLlist))

	runnerUpdate := ysanity.Runner{}
	// Need provide value for identity leaf to avoid YModelError
	deleteValue := types.LeafData{Value: ysanity.ChildIdentity{}.String(), Filter: yfilter.Delete}
	runnerUpdate.Ytypes.BuiltInT.IdentityLlist =
		append(runnerUpdate.Ytypes.BuiltInT.IdentityLlist, deleteValue)
	suite.CRUD.Update(&suite.Provider, &runnerUpdate)

	readEntity = suite.CRUD.ReadConfig(&suite.Provider, &ysanity.Runner{})
	suite.NotNil(readEntity)
	readRunner = readEntity.(*ysanity.Runner)
	suite.Equal(1, len(readRunner.Ytypes.BuiltInT.IdentityLlist))
	suite.Equal(ysanity.ChildChildIdentity{}.String(), readRunner.Ytypes.BuiltInT.IdentityLlist[0].(string))

	// This will delete entire leaf-list as we are deleting the last element
        runnerUpdate = ysanity.Run ner{}
	deleteValue = types.LeafData{Value: ysanity.ChildChildIdentity{}.String(), Filter: yfilter.Delete}
	runnerUpdate.Ytypes.BuiltInT.IdentityLlist =
		append(runnerUpdate.Ytypes.BuiltInT.IdentityLlist, deleteValue)
	suite.CRUD.Update(&suite.Provider, &runnerUpdate)
}

ygorelik added a commit to ygorelik/ydk-gen that referenced this issue Jun 2, 2020
@ygorelik ygorelik closed this as completed Jun 2, 2020
@ygorelik ygorelik added the ready label Jun 2, 2020
shmuelnatan added a commit to siklu/ydk-gen that referenced this issue Jul 12, 2022
* Fixed bug in extracting module name from namespace

* Added distribution packages in GitHub

* Added distribution packages for Ubuntu/xenial on GitHub

* Added distribution packages for Centos to GitHub

* Added distributables for darwin to GitHub

* In Entity class Added method to clone current entity instance

* In Entity class Added method to clone current entity instance

* Added shortcut operator to set yfilter value in YLeaf and YLeafList instances

* Fixing Travis test for gNMI

* Implemented Entity clone in Go (enh. CiscoDevNet#967)

* Fixing Travis test

* Resolved issue CiscoDevNet#968

* Addressed few Codacy issues

* Addressed documentation issue CiscoDevNet#971

* Fixed bug in gNMI set RPC processing

* Corrected documentation of YDK raised exceptions

* Resolved issue CiscoDevNet#978, implemented enhancement 894

* Resolved issue CiscoDevNet#980

* Fixing Travis test for MacOSX

* Resolved GitHub issue CiscoDevNet#983

* Updated bundle for XR-6.6.2 (post1)

* Upgraded GitPython package to version 2.1.15 due to Travis failure

* Upgraded openconfig bundle to version dated 2019-06-21

* Resolved github issue CiscoDevNet#996

* Resolved github issue CiscoDevNet#996

* Corrected error message

* Fixed bug in previous commit

* Fixed GitHub issue CiscoDevNet#997

* Resolved GitHub issue CiscoDevNet#969

* Bumped version to 0.8.5

* Initial development of install_ydk script

* Made corrections for Travis run

* Fixing Travis run

* Adjusted YDK installation script for CentOS

* Added support for ubuntu:focal (20.04 LTS)

* Added deployment packages for ubuntu:xenial

* Fixing Travis run for xenial

* Corrected Dockerfile to include golang packages

* Bumped YDK version to 0.8.5

* Added documentation for missing 'initialize' method

* Added unit test for XmlSubtreeCodec on user defined repository

* Adressed some issues related to installation on CentOS

* Added deployment core packages for CentOS-7

* Added disclaimer on 0.8.5 modified files

* Corrected debug statement

* Added test cases for reading on single container

* Corrected license comment

* Resolved GitHub issues CiscoDevNet#1003, CiscoDevNet#1005, CiscoDevNet#1006

* Updated YDK core deployment packages for Ubuntu xenial and bionic

* Updated YDK core and gNMI libraries for CentOS-7

* Update CONTRIBUTIONS.md with license details

* Update .gitignore

* Added YDK core and gNMI deployment packages for OSX

* Added new options in install_ydk script

* Update YDK version for XR 6.6.3 bundle

* Added C++ test cases for path::Codec with no service provider

* Added use case for deleting entire list

* Added capability for Restconf to work with HTTPS protocol (initial commit)

* Some documentation changes for YDK-0.8.5

* Partially addressed issue CiscoDevNet#917 (HTTPS support for Restconf)

* Resolved GitHub issues CiscoDevNet#1012 ans CiscoDevNet#1013

* Corrected documentation pertaining release 0.8.5

* Removed binary artifacts

* Fixing Travis test

* Fixing Travis test

* Changed bundle backward compatibility test to YDK-0.7.3

* Fixing bundle backward compatibility test

* Enabled Travis test on CentOS-7 docker

* Restored artifacts to 0.8.5

* Lowered version of go testify version

* Lowered version of go testify version

* Updated artifacts for OSX

* Updated artifacts for ubuntu:xenial

* Updated artifacts for CentOS-7

* Update travis testing for Ubuntu

Re-enable Python3 testing for Ubuntu Xenial.

* Fixed few bugs in C++ code

* Resolved issue CiscoDevNet#1021

* added github based online documentation

* Added support for Centos 8 CiscoDevNet#1019

* Resolved issue CiscoDevNet#1024

* Added support for Centos 8 CiscoDevNet#1019

* Fixing Travis test for Centos 8

* Fixing Travis test for Centos 8

* Fixing Travis test for Centos 8

* Fixing Travis test for Centos 8

* Fixing Travis test for Centos 8

* Added support for Ubuntu:focal

* Fixing Travis test for Ubuntu:focal

* Fixing Travis tests for ubuntu:focal

* Fixing Travis tests for ubuntu:focal

* Fixing Travis test for ubuntu:focal

* Fixing Travis test for ubuntu:focal

* Fixing Travis test for ubuntu:focal

* Fixing Travis test for ubuntu:focal

* Fixing Travis test for ubuntu:focal

* Improving unit tests for Mac OS Mojave

* Improving unit tests for Mac OS Mojave

* Added unit test for issue CiscoDevNet#1026

* Added test case after fixing CiscoDevNet#1026 in Libyang

* Corrected YDK service classes initialization issue for python

* Resolved issues CiscoDevNet#1026 and CiscoDevNet#1032

* Updated 0.8.5 documentation

* Resolved issue CiscoDevNet#1036

* Resolved issue CiscoDevNet#1035

* Correcting Travis tests

* Fixing deviation tests

* Fixed confd setting for deviation tests

* Addressed memory leak issue in Executor Service unit tests

* Implemented enhancement CiscoDevNet#1007

* Bumped version to 0.8.5.post1

* Additional code changes for enhancement CiscoDevNet#1007

* Added installation of flex and bison for CentOS platform

* Inforced use of pybind11 v2.2.2

* Corrected test scripts to work with confd version 7.3

* Improved test scripts

* Fixed bug in the bundle generator

* Fixed decoding of leaf-list in XMLSubtreeCodec

* Bumped build version to 2

* Added unit test case for issue CiscoDevNet#1045

* Corrected installation of curl and libcurl for ubuntu:focal

* Corrected documentation for release 0.8.5.2

* Corrected documentation for release 0.8.5.2

* Resolved issue CiscoDevNet#1049

* Fixed memory leak issue

* Added unit test for issue CiscoDevNet#635

* Fixing issue 053

* Created Go wrapper for NetconfSession, added Path API unit tests, CiscoDevNet#779

* Created Go wrappdded Path API unit tests, CiscoDevNet#779

* Resolved GitHub issue CiscoDevNet#1053

* Enabled all CRUD tests related to deleting of list and leaf-list

* Added unit tests and documentation for Path API in Go

* Bumped version to 0.8.5.3 (0.8.5.post3 for python)

* Generated docs. Changed Puthon package version to 0.8.5.3.

* Corrected Copyright statement

* Added support for RestconfSession in Go

* Added C++ documentation related to resolution of enhancement CiscoDevNet#779

* Corrected documentation related to enhancement CiscoDevNet#779

* Upgraded pyang version to 2.5.0

* Upgraded pyang version to 2.5.0

* Dropped Python2 support in the code

* Dropped Python2 support in the code (2)

* Added bundle profiles to support newer versions of IETF OpenConfig and Cisco IOS XR models

* Added bundle profiles for IOS XR version 7.0.1 and 7.0.2

* Added bundle profiles for IOS XR version 7.0.1 and 7.0.2

* Added SSH support for NetconfServiceProvider in Go

* Added SSH support for NetconfServiceProvider in Go

* Added explicit setting of OnDemand flag in NetconfServiceProvider

* Fixed setting of OnDemand flag in NetconfSession in Go

* Solves nil pointer dereference

When calling (NetconfServiceProvider).GetConfig with an empty EntityCollection panics cause of a nil pointer dereference. Adding these if-guards seems to solve the problem.

* Updated release documentation

* Bumped version to 0.8.6

* Implements requested changes

* Update types.go

Corrected suggested code changes.

* Bumped version to 0.8.6.2

* Improving installation script

* Improved installation script to allow use Python system installation

* Fixed few profiles for ietf and cisco-ios-xr bundles

* Fixed few profiles for ietf and cisco-ios-xr bundles

* Reverted version to 0.8.6

* Reverted changes to comply with Python 3.5 syntax

* Restored damaged ydktest profile

* Cleaned up older profiles

* Changed script parameter '--no-py-venv' to '--no-venv'

* Fixed unit test script

* Resolved issue CiscoDevNet#1034

* Corrected documentation after fixing issue CiscoDevNet#1034

* Corrected unit tests for CiscoDevNet#1047 and CiscoDevNet#1048

* Corrected YDK core version requirement

* Corrected YDK core version to 0.8.6.2

* Addressed segmentation fault error

* Corrected Codecy issues

* Minor doc corrections

* Made adjustments for installation on mac osx 11.6

* Added YDK demo. Mentioned added support for MacOS Big Sur

* Provided patch to ensure definition of constant SIGSTKSZ

* Patched catch.hpp for Linux distributions that do not define SIGSTKSZ

* Addressing GitHub issue CiscoDevNet#1059

* Addressing GitHub issue CiscoDevNet#1059

* added demo profile and bundles for Cisco IOS XR

* Fixed unit test in Go for the issue 1059

* Renewed documentation for release 0.8.6.2

* Resolved issue CiscoDevNet#1059

* Resolved issue CiscoDevNet#1056

* Revert "ydkgen: run autopep8 on all ydkgen py files"

This reverts commit e5c17c1.

* fixup

* Close YList class with parenthethis

* Remove one EncodingFormat from the two enums

* Remove unused Entity* in resolve_leaf_value_namespace function in xml_subtree_codec

* Remove Entity from call to resolve_leaf_value_namespace function in xml_subtree_codec

* Remove errors.hpp.
Remove _print_yang_models_function from _print_top_level_entity_functions.
Remove _print_bundle_name_function from _print_top_level_entity_functions.

Co-authored-by: Yan Gorelik <34285093+ygorelik@users.noreply.github.com>
Co-authored-by: ygorelik <ygorelik@cisco.com>
Co-authored-by: Yan Gorelik <yangorelik@yahoo.com>
Co-authored-by: Yan Gorelik <ygorelik@localhost.localdomain>
Co-authored-by: CentOS <centos@centos7.linuxvmimages.com>
Co-authored-by: ubuntu <ubuntu@ubunu2004.linuxvmimagrs.local>
Co-authored-by: Santiago Alvarez <saalvare@cisco.com>
Co-authored-by: Santiago Álvarez <111pontes@users.noreply.github.com>
Co-authored-by: ygorelik <yangorelik@gmail.com>
Co-authored-by: Yan Gorelik <ygorelik@ubunu2004.linuxvmimagrs.local>
Co-authored-by: Daniele Gargano <84291326+viardant@users.noreply.github.com>
Co-authored-by: Shmuel Hazan <shmuel.h@siklu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant