-
Notifications
You must be signed in to change notification settings - Fork 664
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
SONiC Management Framework Release 1.0 #659
Conversation
Scripts to provide the files /var/platform/syseeprom and /var/paltform/system, which are JSON files read by CLI commands, to provide system information. Signed-off-by: Howard Persh <Howard_Persh@dell.com>
Signed-off-by: Howard Persh <Howard_Persh@dell.com>
…onds Signed-off-by: Howard Persh <Howard_Persh@dell.com>
Signed-off-by: Howard Persh <Howard_Persh@dell.com>
Signed-off-by: Howard Persh <Howard_Persh@dell.com>
Added utilities to populate system eeprom and system info for management framework to support openconfig platform and system components
Merging latest changes from Azure
f.close() | ||
os.rename(tmpfile, outfile) | ||
|
||
time.sleep(1) |
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.
What is this sleep for?
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.
To update the output file once per second.
@@ -0,0 +1,31 @@ | |||
#!/usr/bin/awk -f |
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.
Can you please explain, how is this used?
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.
This is a utility to convert the text output of the syseeprom dump utility into JSON.
|
||
ticks_per_sec = os.sysconf(os.sysconf_names['SC_CLK_TCK']) | ||
|
||
while True: |
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 see it as a pretty handy tool to collect all info in human readable format.
Can you help us understand the use case of keeping a file in sync with system state, by running every second ?
[Sorry for the delay. The comments from other PR drowned the rest :-) ]
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.
This was the initial implementation of a back-end for a CLI command to show system status -- the front-end would simply read a known file, which is constantly updated by this back-end daemon.
I would say that, one day soon, the redis DB should be used, and be updated by the daemon, rather than a file.
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.
The sonic-utilities repo is intended for command-line utilities (short-lived applications which will be run by a human at the command line. This repo is not intended to house daemons. Daemons should reside in the sonic-buildimage repo, where the can be installed and managed as services. I suggest that this PR be reverted and the file locations be reconsidered.
Hi Howard, |
This reverts commit e0e8c2f.
SONiC Management Framework Release 1.0
-Combined development from Broadcom and Dell
-Adds support for CLI, REST and GNMI interfaces
-YANG based data modeling
-Schema and syntax validation for Redis DB data using CVL
-written in GO programming language
Added helper scripts syspoll and syseeprom-to-json to poll system data and convert syseeprom data to JSON format.