-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
bugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behavior
Milestone
Description
Description
note: follow on from https://saltstackcommunity.slack.com/archives/CNZKJMQ1E/p1691686473917269?thread_ts=1691617721.100279&cid=CNZKJMQ1E
some vendors supply custom os's with built in custom python packages (cisco, sonic (edgecore, broadcom), nimble, f5) which are not available from pypi etc AND have specific customizations in them for that specific build of the custom os/image.
those python packages make adjusting config/settings of these switches/sans/loadbalancers easier.
with classic packaging it was possible to import and use these python packages, with onedir it is not.
Setup
An example with sonic:
- install qemu on your system.
- download a sonic-vs.img (eg https://sonic-build.azurewebsites.net/api/sonic/artifacts?branchName=master&definitionId=1&artifactName=sonic-buildimage.vs&buildId=334542&target=target%2Fsonic-vs.img.gz)
- start the qemu image with an e1000 bridged nic (see https://github.com/sonic-net/SONiC/wiki/SONiC-on-virtual-machine-for-Windows#3-start-sonic-image for windows example qemu command)
- install onedir salt 3006.x inside the os (debian based)
- run salt's python interpreter, attempt to import any of the images python libs eg:
from sonic_py_common.multi_asic import is_multi_asic
from sonic_py_common.interface import get_interface_table_name, get_port_table_name
from swsscommon import swsscommon
from swsssdk import ConfigDBConnector
from swsscommon.swsscommon import SonicV2Connector
import utilities_common.cli as clicommon
from config.config_mgmt import sonic_cfggen
import click
import config.main as sonic_config_mainthis will fail as onedir cant access these on-system libs
OrangeDog
Metadata
Metadata
Assignees
Labels
bugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behavior