Merge lp:~silverdrake11/landscape-charm/update_ppa into lp:~mitchburton/landscape-charm/op-framework

Proposed by Kevin Nasto
Status: Merged
Approved by: Mitch Burton
Approved revision: 436
Merge reported by: Mitch Burton
Merged at revision: not available
Proposed branch: lp:~silverdrake11/landscape-charm/update_ppa
Merge into: lp:~mitchburton/landscape-charm/op-framework
Diff against target: 73 lines (+10/-6)
4 files modified
config.yaml (+1/-1)
src/charm.py (+6/-3)
src/settings_files.py (+1/-1)
tests/test_charm.py (+2/-1)
To merge this branch: bzr merge lp:~silverdrake11/landscape-charm/update_ppa
Reviewer Review Type Date Requested Status
Mitch Burton Approve
Review via email: mp+438064@code.launchpad.net

Commit message

Updated ppa to point to stable

To post a comment you must log in.
435. By Kevin Nasto

Added bootstrap account back in since it was missing, added landscape-hashids package

436. By Kevin Nasto

Added hashids to upgrade constant

Revision history for this message
Mitch Burton (mitchburton) wrote :

+1 LGTM. Tested with juju deployment locally.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2023-02-16 23:44:57 +0000
3+++ config.yaml 2023-02-28 23:34:07 +0000
4@@ -4,7 +4,7 @@
5 options:
6 landscape_ppa:
7 type: string
8- default: "ppa:landscape/self-hosted-beta"
9+ default: "ppa:landscape/self-hosted-23.03"
10 description: The PPA from which Landscape Server will be installed.
11 worker_counts:
12 type: int
13
14=== modified file 'src/charm.py'
15--- src/charm.py 2023-02-16 23:44:57 +0000
16+++ src/charm.py 2023-02-28 23:34:07 +0000
17@@ -55,6 +55,7 @@
18 "landscape-server",
19 "landscape-client",
20 "landscape-common",
21+ "landscape-hashids"
22 )
23
24 DEFAULT_SERVICES = (
25@@ -188,6 +189,8 @@
26 "package-upload": {"root-url": root_url},
27 })
28
29+ self._bootstrap_account()
30+
31 config_host = self.model.config.get("db_host")
32 config_password = self.model.config.get("db_password")
33 config_port = self.model.config.get("db_port")
34@@ -221,11 +224,11 @@
35 landscape_ppa = self.model.config["landscape_ppa"]
36
37 try:
38- # Add the Landscape Server beta PPA and install via apt.
39+ # Add the Landscape Server PPA and install via apt.
40 check_call(["add-apt-repository", "-y", landscape_ppa])
41- apt.add_package("landscape-server")
42+ apt.add_package(["landscape-server", "landscape-hashids"])
43 except PackageNotFoundError:
44- logger.error("landscape-server package not found in package cache "
45+ logger.error("Landscape package not found in package cache "
46 "or on system")
47 self.unit.status = BlockedStatus("Failed to install packages")
48 return
49
50=== modified file 'src/settings_files.py'
51--- src/settings_files.py 2023-02-03 20:24:46 +0000
52+++ src/settings_files.py 2023-02-28 23:34:07 +0000
53@@ -146,4 +146,4 @@
54 if user:
55 to_update["schema"]["store_user"] = user
56 if to_update:
57- update_service_conf(to_update)
58\ No newline at end of file
59+ update_service_conf(to_update)
60
61=== modified file 'tests/test_charm.py'
62--- tests/test_charm.py 2023-02-16 23:44:57 +0000
63+++ tests/test_charm.py 2023-02-28 23:34:07 +0000
64@@ -73,7 +73,8 @@
65
66 mocks["check_call"].assert_called_once_with(
67 ["add-apt-repository", "-y", ppa])
68- mocks["apt"].add_package.assert_called_once_with("landscape-server")
69+ mocks["apt"].add_package.assert_called_once_with(["landscape-server",
70+ "landscape-hashids"])
71 status = harness.charm.unit.status
72 self.assertIsInstance(status, WaitingStatus)
73 self.assertEqual(status.message,

Subscribers

People subscribed via source and target branches

to all changes: