Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for consistency with other SD-Core charms #7

Merged
merged 3 commits into from May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions metadata.yaml
Expand Up @@ -7,7 +7,7 @@ description: |

containers:
udr:
resource: sdcore-udr-image
resource: udr-image
mounts:
- storage: config
location: /free5gc/config/
Expand All @@ -19,7 +19,7 @@ requires:
interface: fiveg_nrf

resources:
sdcore-udr-image:
udr-image:
type: oci-image
description: OCI image for SD-Core's UDR
upstream-source: omecproject/5gc-udr:master-35eb7b7
Expand Down
2 changes: 1 addition & 1 deletion src/charm.py
Expand Up @@ -275,5 +275,5 @@ def _get_pod_ip() -> Optional[IPv4Address]:
return IPv4Address(check_output(["unit-get", "private-address"]).decode().strip())


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
main(UDROperatorCharm)
2 changes: 1 addition & 1 deletion src/templates/udrcfg.yaml.j2
Expand Up @@ -6,7 +6,7 @@ configuration:
sbi: # Service-based interface information
scheme: http # the protocol for sbi (http or https)
registerIPv4: {{ udr_ip_address }}
Gmerold marked this conversation as resolved.
Show resolved Hide resolved
bindingIPv4: {{ udr_ip_address }}
bindingIPv4: 0.0.0.0
port: {{ udr_sbi_port }}
tls: # the local path of TLS key
pem: config/TLS/udr.pem # UDR TLS Certificate
Expand Down
6 changes: 1 addition & 5 deletions tests/integration/test_integration.py
Expand Up @@ -28,11 +28,7 @@ async def setup(self, ops_test):
@pytest.mark.abort_on_fail
async def build_and_deploy_charm(self, ops_test):
charm = await ops_test.build_charm(".")
resources = {
f"{APPLICATION_NAME}-image": METADATA["resources"][f"{APPLICATION_NAME}-image"][
"upstream-source"
],
}
resources = {"udr-image": METADATA["resources"]["udr-image"]["upstream-source"]}
await ops_test.model.deploy(
charm,
resources=resources,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/resources/expected_udrcfg.yaml
Expand Up @@ -6,7 +6,7 @@ configuration:
sbi: # Service-based interface information
scheme: http # the protocol for sbi (http or https)
registerIPv4: 1.2.3.4
bindingIPv4: 1.2.3.4
bindingIPv4: 0.0.0.0
port: 29504
tls: # the local path of TLS key
pem: config/TLS/udr.pem # UDR TLS Certificate
Expand Down