-
Notifications
You must be signed in to change notification settings - Fork 46
Conversation
@@ -27,82 +28,68 @@ interfaces: | |||
admin-status: | |||
_process: | |||
- mode: map | |||
value: "{{ bookmarks.parent.get('interfaceStatus', 'disabled') }}" | |||
path: interfaceStatus | |||
defaul: disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing this is a typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks! I am actually going to remove the default
argument. I don't think it's needed.
@@ -1 +1,323 @@ | |||
{"interfaces": {"Management1": {"lastStatusChangeTimestamp": 1497732472.6491787, "name": "Management1", "interfaceStatus": "connected", "autoNegotiate": "success", "description": "", "burnedInAddress": "08:00:27:6b:fa:fe", "bandwidth": 1000000000, "mtu": 1500, "hardware": "ethernet", "duplex": "duplexFull", "loopbackMode": "loopbackNone", "physicalAddress": "08:00:27:6b:fa:fe", "interfaceCounters": {"outBroadcastPkts": 0, "linkStatusChanges": 5, "totalOutErrors": 0, "inMulticastPkts": 0, "counterRefreshTime": 1497734297.210793, "inBroadcastPkts": 19, "inputErrorsDetail": {"runtFrames": 0, "fcsErrors": 0, "alignmentErrors": 0, "rxPause": 0, "symbolErrors": 0, "giantFrames": 0}, "inOctets": 97807, "outDiscards": 0, "outOctets": 112236, "inUcastPkts": 0, "outputErrorsDetail": {"lateCollisions": 0, "deferredTransmissions": 0, "txPause": 0, "collisions": 0}, "outUcastPkts": 758, "outMulticastPkts": 0, "totalInErrors": 0, "inDiscards": 0}, "interfaceStatistics": {"inBitsRate": 327.13344777831077, "updateInterval": 300.0, "outBitsRate": 513.747345263329, "outPktsRate": 0.3882478230578469, "inPktsRate": 0.00013831271000537475}, "interfaceAddress": [{"secondaryIpsOrderedList": [], "primaryIp": {"maskLen": 24, "address": "10.0.2.15"}, "broadcastAddress": "255.255.255.255", "secondaryIps": {}, "virtualIp": {"maskLen": 0, "address": "0.0.0.0"}}], "lineProtocolStatus": "up", "forwardingModel": "routed"}, "Ethernet1": {"lastStatusChangeTimestamp": 1497732461.1365635, "name": "Ethernet1", "interfaceStatus": "connected", "autoNegotiate": "unknown", "description": "", "bandwidth": 0, "mtu": 1500, "hardware": "ethernet", "duplex": "duplexFull", "loopbackMode": "loopbackNone", "physicalAddress": "08:00:27:66:ef:40", "interfaceCounters": {"outBroadcastPkts": 0, "linkStatusChanges": 1, "lastClear": 1497732401.4158947, "inMulticastPkts": 97, "counterRefreshTime": 1497734297.214895, "inBroadcastPkts": 2630, "inputErrorsDetail": {"runtFrames": 0, "fcsErrors": 0, "alignmentErrors": 0, "rxPause": 0, "symbolErrors": 0, "giantFrames": 0}, "inOctets": 212355, "outDiscards": 0, "outOctets": 43559, "inUcastPkts": 118, "outputErrorsDetail": {"lateCollisions": 0, "deferredTransmissions": 0, "txPause": 0, "collisions": 0}, "outUcastPkts": 104, "outMulticastPkts": 73, "totalInErrors": 0, "inDiscards": 0, "totalOutErrors": 0}, "interfaceStatistics": {"inBitsRate": 0.0, "updateInterval": 300.0, "outBitsRate": 0.0, "outPktsRate": 0.0, "inPktsRate": 0.0}, "interfaceAddress": [{"secondaryIpsOrderedList": [], "primaryIp": {"maskLen": 24, "address": "192.168.50.11"}, "broadcastAddress": "255.255.255.255", "secondaryIps": {}, "virtualIp": {"maskLen": 0, "address": "0.0.0.0"}}], "lineProtocolStatus": "up", "forwardingModel": "routed"}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to have further discussion regarding the test cases, especially as we start having more complex models that may have multiple commands. As it stands, the single .native file is read as a string, as passed as the complete string being sole list entry in native
. How would we make this work when dealing with mappings that require multiple command execution?
Not saying we have to solve this now, just that it's still on my mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to that. An easy solution would be to name the file yadda.native.0, yadda.native.1
and use the number to place them in the correct position in the list.
Will do some performance testing of oc-platform and my _oc_platform() method tomorrow. |
Changes:
mandatory
elements, previously on the default action, to a dedicated actionfrom
is optional, by default it will always follow theparent
from
is now a pointer, no need to keep serializing/deserializingmode
is optional. All parsers have a maindefault
action now.Pinging @matejv @bewing @mirceaulinic @ktbyers
The idea is to start getting rid of redundant things and make things as consistent and easy as possible. Simplification are far from complete so feel free to propose other changes that you think might be worth exploring.