Skip to content

Commit

Permalink
Merge pull request #158 from e-sonic/merge-0805/broadcom_sonic_4.0.x_…
Browse files Browse the repository at this point in the history
…share-to-dell_sonic_4.0.x_share

sync from broadcom_sonic_4.0.x_share to dell_sonic_4.0.x_share - 0805
  • Loading branch information
jeff-yin authored and GitHub Enterprise committed Aug 9, 2022
2 parents 71b6490 + 68cc9bd commit 907314b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 30 deletions.
15 changes: 0 additions & 15 deletions CLI/actioner/sonic_cli_xcvr_dom.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,10 @@ def getPortFirstLine(port, data):

return line_id

def convert4BytesToStr(b):
if (b is None) or (len(b.strip()) == 0):
return '-inf'
try:
val = unpack('>f', b64decode(b))[0]
ret = "{:.2f}".format(val)
except:
ret = '-inf'
return ret

def fixupXcvrDom(info, isSummary):
for port in info:
data = info[port]

# Convert ieeefloat32(binary) into a float
for attr in data:
if ('power' in attr) or ('bias' in attr) or ('volt' in attr) or ('temp' in attr):
data[attr] = convert4BytesToStr(data[attr])

# Initialize the module readings
for line in range(9):
if ("rx-power" in data) and ("tx-power" in data) and ("tx-bias" in data):
Expand Down
18 changes: 9 additions & 9 deletions CLI/clitree/cli-xml/interface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1042,9 +1042,9 @@ limitations under the License.
help="Textual description">
<PARAM
name="desc"
help="Textual description of the interface (Max: 240 characters)"
help="Textual description of the interface"
dbpath="sonic-port:sonic-port/PORT/PORT_LIST/description"
ptype="STRING_240" />
ptype="STRING_WITH_PIPE" />
<ACTION builtin="clish_pyobj">sonic_cli_if patch_openconfig_interfaces_interfaces_interface_config_description ${iface} ${#desc}</ACTION>
</COMMAND>
<COMMAND
Expand Down Expand Up @@ -1452,9 +1452,9 @@ limitations under the License.
help="Textual description">
<PARAM
name="desc"
help="Textual description of the interface (Max: 240 characters)"
help="Textual description of the interface"
dbpath="sonic-loopback:sonic-loopback/LOOPBACK/LOOPBACK_LIST/description"
ptype="STRING_240" />
ptype="STRING_WITH_PIPE" />
<ACTION builtin="clish_pyobj">sonic_cli_if patch_openconfig_interfaces_interfaces_interface_config_description ${lo_name} ${#desc}</ACTION>
</COMMAND>
<COMMAND
Expand Down Expand Up @@ -1491,9 +1491,9 @@ limitations under the License.
help="Textual description">
<PARAM
name="desc"
help="Textual description of the interface (Max: 240 characters)"
help="Textual description of the interface"
dbpath="sonic-vlan:sonic-vlan/VLAN/VLAN_LIST/description"
ptype="STRING_240" />
ptype="STRING_WITH_PIPE" />
<ACTION builtin="clish_pyobj">sonic_cli_if patch_openconfig_interfaces_interfaces_interface_config_description ${vlan_name} ${#desc}</ACTION>
</COMMAND>
<COMMAND
Expand Down Expand Up @@ -1676,9 +1676,9 @@ limitations under the License.
help="Textual description">
<PARAM
name="desc"
help="Textual description of the interface (Max: 240 characters)"
help="Textual description of the interface"
dbpath="sonic-portchannel:sonic-portchannel/PORTCHANNEL/PORTCHANNEL_LIST/description"
ptype="STRING_240" />
ptype="STRING_WITH_PIPE" />
<ACTION builtin="clish_pyobj">sonic_cli_if patch_openconfig_interfaces_interfaces_interface_config_description ${po_name} ${#desc}</ACTION>
</COMMAND>
<COMMAND
Expand Down Expand Up @@ -1983,7 +1983,7 @@ limitations under the License.
<PARAM
name="desc"
help="Textual description of the interface"
ptype="STRING"
ptype="STRING_WITH_PIPE"
dbpath="sonic-mgmt-port:sonic-mgmt-port/MGMT_PORT/MGMT_PORT_LIST/description" />
<ACTION builtin="clish_pyobj">sonic_cli_if patch_openconfig_interfaces_interfaces_interface_config_description ${iface} ${#desc}</ACTION>
</COMMAND>
Expand Down
8 changes: 4 additions & 4 deletions CLI/clitree/macro/interface_macro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ limitations under the License.
help="Textual description">
<PARAM
name="desc"
help="Textual description of the interface (Max: 240 characters)"
ptype="STRING_240" />
help="Textual description of the interface"
ptype="STRING_WITH_PIPE" />
<ACTION builtin="clish_pyobj">sonic_cli_if_range config_if_range iflist=arg1 patch_description ${#desc}</ACTION>
</COMMAND>
<COMMAND
Expand All @@ -123,8 +123,8 @@ limitations under the License.
help="Textual description">
<PARAM
name="desc"
help="Textual description of the interface (Max: 240 characters)"
ptype="STRING_240" />
help="Textual description of the interface"
ptype="STRING_WITH_PIPE" />
<ACTION builtin="clish_pyobj">sonic_cli_if_range config_if_range iflist=arg1 patch_description ${#desc}</ACTION>
</COMMAND>
<COMMAND
Expand Down
4 changes: 2 additions & 2 deletions ham/hamd/etc/sonic/hamd/group-mapping
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
# netoperator:operator
# 0:operator​

admin:sudo,docker,redis,adm
operator:docker
admin:sudo,docker,redis,adm,admin
operator:docker,operator

0 comments on commit 907314b

Please sign in to comment.