Skip to content

Commit

Permalink
Drop APIv2 CNI configuration
Browse files Browse the repository at this point in the history
**Depends on PR 23538**

CNI is no longer needed/supported.

Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Aug 9, 2024
1 parent dd1d2c1 commit a48cd24
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 72 deletions.
36 changes: 0 additions & 36 deletions test/apiv2/python/rest_api/fixtures/podman.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,42 +38,6 @@ def __init__(self):
with open(os.environ["CONTAINERS_REGISTRIES_CONF"], "w") as w:
p.write(w)

os.environ["CNI_CONFIG_PATH"] = os.path.join(self.anchor_directory, "cni", "net.d")
os.makedirs(os.environ["CNI_CONFIG_PATH"], exist_ok=True)
self.cmd.append("--network-config-dir=" + os.environ["CNI_CONFIG_PATH"])
cni_cfg = os.path.join(os.environ["CNI_CONFIG_PATH"], "87-podman-bridge.conflist")
# json decoded and encoded to ensure legal json
buf = json.loads(
"""
{
"cniVersion": "0.3.0",
"name": "podman",
"plugins": [{
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.88.0.0/16",
"routes": [{
"dst": "0.0.0.0/0"
}]
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
}
]
}
"""
)
with open(cni_cfg, "w") as w:
json.dump(buf, w)

def open(self, command, *args, **kwargs):
"""Podman initialized instance to run a given command
Expand Down
36 changes: 0 additions & 36 deletions test/python/docker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,42 +68,6 @@ def __init__(self):
with open(os.environ["CONTAINERS_REGISTRIES_CONF"], "w") as file:
file.write(conf)

os.environ["CNI_CONFIG_PATH"] = os.path.join(self.anchor_directory, "cni", "net.d")
os.makedirs(os.environ["CNI_CONFIG_PATH"], exist_ok=True)
self.cmd.append("--network-config-dir=" + os.environ["CNI_CONFIG_PATH"])
cni_cfg = os.path.join(os.environ["CNI_CONFIG_PATH"], "87-podman-bridge.conflist")
# json decoded and encoded to ensure legal json
buf = json.loads(
"""
{
"cniVersion": "0.3.0",
"name": "default",
"plugins": [{
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.88.0.0/16",
"routes": [{
"dst": "0.0.0.0/0"
}]
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
}
]
}
"""
)
with open(cni_cfg, "w") as file:
json.dump(buf, file)

def open(self, command, *args, **kwargs):
"""Podman initialized instance to run a given command
Expand Down

0 comments on commit a48cd24

Please sign in to comment.