Skip to content

Commit

Permalink
Address fan-network disabling on aws (#133)
Browse files Browse the repository at this point in the history
* Address fan-network disabling on aws
  • Loading branch information
addyess authored Jul 15, 2024
1 parent 24a6566 commit 390d8f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,20 @@ async def cloud_proxied(ops_test: OpsTest):


async def cloud_profile(ops_test: OpsTest):
"""Apply lxd-profile to the model if the juju cloud is lxd.
"""Apply Cloud Specific Settings to the model
Args:
ops_test (OpsTest): ops_test plugin
"""
if await cloud_type(ops_test) == "lxd" and ops_test.model:
_type = await cloud_type(ops_test)
if _type == "lxd" and ops_test.model:
# lxd-profile to the model if the juju cloud is lxd.
lxd = LXDSubstrate("", "")
profile_name = f"juju-{ops_test.model.name}"
lxd.remove_profile(profile_name)
lxd.apply_profile("k8s.profile", profile_name)
elif _type == "ec2" and ops_test.model:
await ops_test.model.set_config({"container-networking-method": "local", "fan-config": ""})


@contextlib.asynccontextmanager
Expand Down

0 comments on commit 390d8f5

Please sign in to comment.