{"id":18875297,"url":"https://github.com/opencomputeproject/oom","last_synced_at":"2025-04-14T17:31:22.255Z","repository":{"id":47811495,"uuid":"49236739","full_name":"opencomputeproject/oom","owner":"opencomputeproject","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-12T21:56:15.000Z","size":341,"stargazers_count":63,"open_issues_count":8,"forks_count":27,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-03-15T13:36:08.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencomputeproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-07T23:19:30.000Z","updated_at":"2024-03-13T16:17:18.000Z","dependencies_parsed_at":"2022-08-29T23:31:43.718Z","dependency_job_id":null,"html_url":"https://github.com/opencomputeproject/oom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Foom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Foom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Foom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Foom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencomputeproject","download_url":"https://codeload.github.com/opencomputeproject/oom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223639402,"owners_count":17177816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T06:06:56.420Z","updated_at":"2024-11-08T06:06:57.066Z","avatar_url":"https://github.com/opencomputeproject.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oom\nOpen Optical Monitoring - http://www.opencompute.org/wiki/Networking/SpecsAndDesigns#Open_Optical_Monitoring\n\nThis is a project to make the contents of optical module EEPROMs\naccessible to python programmers.  This allows a python programmer\nto query the value of dozens of keys (serial Number, module type,\ntemperature, transmit power, ...), for the optical module in each\nport of a switch.  In addition to key/value read access, the OOM\nproject also supports key/value write to a limited number of EEPROM\nlocations, and raw read/write access directly to EEPROM.\n\nNEWS: August 12, 2021\nTwo different big updates...\n\nOOM, the python package, has been updated to support Python 3.  It also\nsupports Python 2.7, with the same code and interface.  (Install it\nvia setup.py, separately for each version of python.)  It should be\nbackward compatible except that the 'hexstr' function has been renamed\n'get_hexstr'.\n\noptoe, the linux driver, was significantly updated to build/run in the\n5.11 upstream linux kernel.  It was submitted there, and rejected for\narchitectural, not technical reasons.  That code has been checked in here.\nThis update includes device tree support, nvmem support and regmap support.\nThis it can be configured via device tree files, and it can be accessed from\nwithin the kernel.  It is also completely backward compatible with the\nprevious version of optoe.  Check oom/optoe/optoe.rst for documentation on\nthe original and new capabilities.\n\nNEWS:  August 1, 2019\nThe optoe driver has been updated to support CMIS type devices.  These\ninclude QSFP-DD, OSFP, COBO and SFP-DD at least.  They conform to the\n\"Common Management Interface Specification\", which defines a different\nEEPROM layout from either SFP (sff_8472) or QSFP (sff_8636) type devices.\nSee the 'optoe_doc' file in the optoe directory for details on how to\nspecify a CMIS device (hint, it is 'optoe3').\n\nAn OOM keyfile for CMIS devices has also been added (cmis.py).  Consider\nit a sample.  The keys are believed to be correct, but only a limited\nnumber of keys have been implemented.  Users can add their own keyfile\ndefining more keys, or contact the maintainer to discuss adding keys to\nthe cmis.py file.\n\nNEWS:  February 2, 2018\nThe optoe driver has been used by several server vendors, and pushed\nto at least two NOS repos.  Much has been learned in the process.  Sonic\nis migrating to Linux 4.9, which has removed one interface that optoe was\nusing.  So, optoe has been updated to incorporate this and several other\nitems:\n  - optoe.h merged into optoe.c (based on feedback from users)\n  - removed struct memory_accessor (not in Linux 4.6 and newer)\n  - accept port_name through platform_data if provided\n  - minor simplification of code\n  - optoe.c passes linux checkpatch.pl and is ready to submit upstream\n\nSwitch and NOS vendors are encouraged to use this version of optoe.c\nIf you need to change the code for your usage, please discuss this\nwith don@thebollingers.org so I can maintain a common driver for all.\n\nNEWS:  December 3, 2017\nThe OOM graphical demo has been released in this github repo.  Used by\nFinisar at the last two OCP Summits, it is now available to all.  As\nwith all of OOM, it works equally for any optics that conform to the\nrelevant standards, and works on any switch/NOS stack that supports OOM.\nSee the file in demo/README for instructions to install and use.\n\nNEWS:  October 8, 2017\nBeta Release of the 'optoe' driver.  Supports SFP type (SFF-8472) and\nQSFP type (SFF-8436) i2c devices, provides read/write access to all\n256 architected pages (tables) of these devices.  Driver, include file\nand brief documentation are in the 'optoe' directory.\n\nOOM has been updated to locate eeprom files and port names created by optoe.\n\nNEWS:  August 25, 2017\nChecked in a linux driver that demonstrates write capability, and the\nability to access up to the full 128 pages architected for SFP/QSFP\noptical transceivers.  Probably not ready for production deployment,\nit has undergone limited testing, and does not rigorously handle all\nerror paths.  Built and run successfully on a Linux 3.2 and\nLinux 4.1 kernel in a Cumulus NOS environment on an AS5712. This code\nhas also been ported and tested on the accton AS7712-32x development\nenvironment.  (see oom/sff_8436_eeprom_deb.c, oom_sff-8436.h)\n\nCFP support has been implemented.  Note only 4 keys implemented so far,\nbut all the code is in place to support all functions.\n\nNEWS:  March 31, 2017\n\nCreated a Python shim, that automatically identifies ports and EEPROM files\nfor Cumulus and ONL drivers.  This shim eliminates the need to compile\na C library for use as the NOS-specific shim.  Thus there is no requirement\nto have a build environment to install OOM.  At runtime, OOM will still try\nfirst to load a C library (.so) shim from \u003cpackage_dir\u003e/lib/oom_south.so.\nThis allows existing and additional C shims to be used with OOM.  If it\nfails to load lib/oom_south.so, then it will load the Python shim\n(oomsysfsshim.py).\n\nThe process to install OOM on a switch now is:\n\n\tcd /usr/local     \u003cor any location you prefer, OOM doesn't care\u003e\n\tmkdir oom         \u003cor any  name you prefer, OOM doesn't care\u003e\n\tcd oom\n\t# install OOM (can also be copied from a thumbstick or ...)\n\tgit clone https://github.com/opencomputeproject/oom.git\n\tcd oom\n\tpython setup.py install   # installation is complete\n\t# verify it works\n\tcd apps\n\tpython inventory.py   \u003cshould list all the ports, ID the modules\u003e\n\nThere is also now a JSON WSGI shim, and a web service, to provide OOM services\nover the network, from a switch to a management server.  This is a simple\nproof of concept, probably not secure enough for your production environment.\nIt consists of a python shim (oomjsonshim.py) which is used by the OOM\napplication to inventory ports, and read/write EEPROMs, over the network.\nIt is loaded via 'oomlib.setshim(\"oomjsonshim\", \u003cswitch URL\u003e'.  The URL can\nbe as simple as 192.168.0.100.  Fully decorated, it would be\nhttp://192.168.0.100:5000/OOM (the web server operates at port 5000).\nTo start the web service, install OOM on the switch, and run\n\u003coom_dir\u003e/apps/oomjsonsvr.py.  This script can also be run as a service,\nlaunched at startup of the switch.\n\nNote, there is a new OOM interface, oomlib.setshim(shim, parms).  This\ninterface loads the named python shim, then calls the shim's 'setparms'\nroutine with 'parms' as it's only parameter.  (See the code.)\n\nOld News: July 13, 2016\n\n   Updated the version of OOM to 0.4, LOTS of improvements have gone in\n   since the last version update.  The most recent change, which triggered\n   the version roll, is a reorganization to the code, and a code cleanup\n   which allows OOM to be installed as a site-specific python package.\n\n   As of Version 0.4, there is a test directory, for scripts which test\n   the OOM code.  There is an apps directory for scripts which provide\n   useful user output from OOM or otherwise call on OOM but are not\n   part of the package API.  The data files which drive the simulator\n   SHIM have been moved to the module_data directory.  The remaining files\n   in the oom directory are the core OOM library modules, plus the SHIMs\n   and make files to assemble OOM.  (The SHIMs may be factored out as well\n   in a future version.)\n\n   OOM can now be installed as a package.  In the top level oom directory\n   there is a setup.py script.  AFTER building oom with the desired SHIM,\n   oom can be installed with 'python setup.py install'.  Building the\n   appropriate SHIM (simulator(file), aardvark, or the one that matches\n   the NOS on which it is installed), must be done first, so that the SHIM\n   will be installed with the package.  Note that only the OOM API is\n   installed as a package.  The test and apps directories contain scripts\n   that can be run from anywhere, but are not installed as part of the\n   package.\n\n   There are many ways to acquire and install OOM, but this recipe is\n   known to work in the Cygwin environment, to install the simulator SHIM:\n\n\tcd /usr/local     \u003cor any location you prefer, OOM doesn't care\u003e\n\tmkdir oom         \u003cor any  name you prefer, OOM doesn't care\u003e\n\tcd oom\n\t# install OOM (can also be copied from a thumbstick or ...)\n\tgit clone https://github.com/opencomputeproject/oom.git\n\tcd oom/oom\n\tmake SHIM=file all\n\tcd ..\n\tpython setup.py install   # installation is complete\n\t# verify it works\n\tcd apps\n\tpython inventory.py   # shows simulated switch:  SFP, QSFP+, QSFP28\n\n   OOM can also be built for use in a native Windows environment.  The\n   recipe depends on use of the x86_64-w64-mingw32-gcc compiler, and has\n   only been used in a Cygwin environment.  This recipe builds with the\n   Aardvark SHIM, for testing devices with an Aardvark USB/i2c adapter.\n   If you are using this environment, contact Don (don@thebollingers.org)\n   for additional support and documentation. The recipe:\n\n\tcd \u003cwhere you want to stage oom\u003e\n\tmkdir myoom\n\tcd myoom\n\tgit clone https://github.com/ocpnetworking-wip/oom.git\n\tcd oom/oom\n\tmake -f makewindows\n\t\u003cbuild a ZIP file containing everything in myoom/oom\u003e\n\t\u003cmove the ZIP file to the target Windows system\u003e\n\t\u003cunpack the ZIP file into the desired Windows folder\u003e\n\tpython setup.py install  # installation is complete\n\tcd apps\n\tpython inventory.py  # shows Aardvark accessible device(s)\n\n\nOld News:  February 16, 2016\n\n   The Master branch has been updated with the latest work:\n     - Added table drive oom_set_keyvalue()\n     - Added write keys to sfp.py, qsfp_plus.py\n     - Added memory map, function map and write map (mmap, fmap, wmap)\n       to each (python) port at initialization (oom_get_portlist())\n     - Cleaned up mapping of module type to 'sfp.py', 'qsfp_plus.py'.\n       New decode types can just be added as new files to the package\n       without modifying code.\n     - Fixed linux build issues (thanks Dustin)\n     - Removed all the pesky DOS \u003ccr\u003e at the end of each line of\n       many files (thanks Dustin)\n     - I will continue to use the 'dev' branch for upcoming changes\n     - Old news and mundane stuff below is still accurate\n\nOld News: Feb 11\n\n   The new Southbound API is now committed to the master branch,\n   and should be considered accepted for development going forward.\n\n   The 'dev' branch will contain latest updates going forward, and\n   is also based on the new Southbound API\n\n   BETA, demo_code and newsouth branches have been removed.  Master\n   is stable and complete, previous branches are out of date.\n\n\nMore mundane stuff...\n\nThere is a mock Southbound Shim, oom_south.c, among the python modules.\nThis make file builds the mock shim, installs it, and also installs\nsome data files with static but real data for some modules.\n\nThe user accessible functions are all in oom.py, which constitutes the\n\"Northbound Interface\".  The use of all of these functions is shown\nin oomdemo.py \u003cnow in the apps directory\u003e.  oomdemo.py is very short,\ndemonstrating not only the functionality, but the simplicity of the\ninterface.\n\n\u003cNow in the test directory...\u003e\nkeytest.py extracts and displays every key available for SFP modules,\nas well as the key collections (functions) available.\n\nqtest.py extracts and displays every key available for QSFP+ modules,\nas well as the key collections (functions) available.\n\nThe build process assumes your C compiler builds libraries that your\nPython interpereter can run!\n\nNote in the makefile the process to populate the module_data directory\nwith data with the correct names.  Substitute different source files,\nor give these different numbers in the first character to populate\ndifferent ports with different data.\n\nQuestions?  Please contact don@thebollingers.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Foom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencomputeproject%2Foom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Foom/lists"}