Jira (PUP-8597) Modify rich data serialization to use shorter tags instead of __pcore_type__

2 views
Skip to first unread message

Henrik Lindberg (JIRA)

unread,
Mar 23, 2018, 10:32:02 AM3/23/18
to puppe...@googlegroups.com
Henrik Lindberg created an issue
 
Puppet / Improvement PUP-8597
Modify rich data serialization to use shorter tags instead of __pcore_type__
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2018/03/23 7:31 AM
Priority: Normal Normal
Reporter: Henrik Lindberg

Serialization of rich data in JSON/YAML is currently using the tags:

__pcore_type__
__pcore_value__

Those are longer than they need to be for making them unique/non-clashing with normal attributes.

We should shorten those to:

__ptype
__pvalue

When writing, but continue to support the longer tags when reading.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Mar 23, 2018, 3:00:04 PM3/23/18
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Mar 23, 2018, 3:01:03 PM3/23/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Release Notes Summary: The earlier rich data format used the tags __pcore_type__ and __pcore_value__, these are now shortened to __ptype and __pvalue respectively.
Sprint: Platform Core KANBAN
Release Notes: Deprecation
Fix Version/s: PUP 6.0.0

Rick Sherman (JIRA)

unread,
Mar 28, 2018, 12:01:04 PM3/28/18
to puppe...@googlegroups.com
Rick Sherman commented on Improvement PUP-8597
 
Re: Modify rich data serialization to use shorter tags instead of __pcore_type__

Heads up Thomas Honey and William Meek - this will affect our YANG modules.  If we want to support earlier versions of Puppet I suppose we'll have to support both names.

cc Davin Hanlon

lib/puppet/provider/ietf_interfaces/netconf.rb
86:              if pcore.respond_to? :_pcore_type
92:          elsif @property_hash[puppet_name.to_sym].respond_to? :_pcore_type
 
lib/puppet/provider/yang_ietf.rb
117:      if k._pcore_type.instance_of? Puppet::Pops::Types::PObjectType
130:          elsif k.instance_variable_get(i).respond_to? :_pcore_type
137:              if k._pcore_type[i.to_s.tr('@','')].type.type.name == "Vanilla_ice::YangEmpty"

Henrik Lindberg (JIRA)

unread,
Mar 28, 2018, 4:23:10 PM3/28/18
to puppe...@googlegroups.com

Rick Sherman That code is not affected, that is the Pcore API - the change is just for the human readable serialization format where the tags before the change were _pcore_type and pcore_value_ - i.e. not the _pcore_type method on an object that returns its type.

You would only have to change if you are reading or writing serializations of puppet objects using the human readable JSON serializer. Do you?

Thomas Hallgren (JIRA)

unread,
May 28, 2018, 10:40:03 AM5/28/18
to puppe...@googlegroups.com

Thomas Hallgren (JIRA)

unread,
May 28, 2018, 10:40:04 AM5/28/18
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
May 29, 2018, 12:18:02 PM5/29/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Release Notes Summary: The earlier rich data experimental --rich_data format used the tags __pcore_type__ and __pcore_value__, these are now shortened to __ptype and __pvalue respectively. If you are using this experimental feature and have stored serializations you need to change them or write them again with the updated version.

Josh Cooper (JIRA)

unread,
Jul 31, 2018, 3:21:03 PM7/31/18
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-8597
 
Re: Modify rich data serialization to use shorter tags instead of __pcore_type__

Henrik Lindberg, Thomas Hallgren can you point me to the schema that describes the current pcore serialization format? /cc Rob Browning

Josh Cooper (JIRA)

unread,
Aug 3, 2018, 1:49:02 PM8/3/18
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-8597

Davin Hanlon, Rick Sherman will this change break YANG modules? Do you know if there is a specification for pcore format?

Davin Hanlon (JIRA)

unread,
Aug 6, 2018, 6:02:03 AM8/6/18
to puppe...@googlegroups.com
Davin Hanlon commented on Improvement PUP-8597

Josh Cooper - from Rick Sherman's earlier comment it looks like it will. However, the YANG modules are not released, so we can make changes before we release them to account for this. Does that seem OK Rick Sherman Thomas Honey?

Rick Sherman (JIRA)

unread,
Aug 6, 2018, 11:05:11 AM8/6/18
to puppe...@googlegroups.com
Rick Sherman commented on Improvement PUP-8597

We should be okay.  Those modules are still unreleased and we can update them if needed.

Josh Cooper (JIRA)

unread,
Aug 6, 2018, 3:12:02 PM8/6/18
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-8597

Thanks all. Is there a specification for the serialization format?

Thomas Hallgren (JIRA)

unread,
Aug 16, 2018, 5:52:03 AM8/16/18
to puppe...@googlegroups.com

Josh Cooper, I don't think any formal specification has been written yet. I created ticket PUP-9070.

John Duarte (JIRA)

unread,
Oct 21, 2019, 10:53:03 AM10/21/19
to puppe...@googlegroups.com
John Duarte updated an issue
 
Change By: John Duarte
QA Risk Assessment: Needs Assessment No Action
Reply all
Reply to author
Forward
0 new messages