[pddf]: Adding and enabling S3IP support in PDDF (#15073)

Why I did it
The S3IP (Simplified Switch System INtegration Program) sysfs specification defines a unified interface to access peripheral hardware on devices from different vendors, making it easier for SONiC to support different devices and platforms.

PDDF is a framework to simplify the driver and SONiC platform APIs development for new platforms. This effort is first step in combining the two frameworks.

This specific PR adds support for pddf-s3ip-init.service and enables it in PDDF.
This commit is contained in:
FuzailBrcm 2023-05-19 01:43:16 +05:30 committed by GitHub
parent 819ab5db50
commit 771a1170d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1146 additions and 0 deletions

View File

@ -0,0 +1,14 @@
[Unit]
Description=S3IP sysfs creation in PDDF based platforms
After=pddf-platform-init.service
DefaultDependencies=no
[Service]
Type=oneshot
ExecStartPre=-/usr/local/bin/pre_pddf_s3ip.sh
ExecStart=/usr/local/bin/pddf_s3ip.py create
ExecStop=/usr/local/bin/pddf_s3ip.py clean
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

File diff suppressed because it is too large Load Diff

View File

@ -455,6 +455,11 @@ def do_install():
if status:
return status
# Check if S3IP support is enabled, if yes, start the service in no block mode
if 'enable_s3ip' in pddf_obj.data['PLATFORM'].keys() and pddf_obj.data['PLATFORM']['enable_s3ip'] == 'yes':
log_os_system('systemctl enable pddf-s3ip-init.service', 1)
log_os_system('systemctl start --no-block pddf-s3ip-init.service', 1)
return
def do_uninstall():