diff --git a/snapcraft_legacy/__init__.py b/snapcraft_legacy/__init__.py index bed7b33642..97b9f6a0cd 100644 --- a/snapcraft_legacy/__init__.py +++ b/snapcraft_legacy/__init__.py @@ -355,7 +355,6 @@ def _get_version(): download, gated, list_keys, - list_registered, login, register, register_key, diff --git a/snapcraft_legacy/_store.py b/snapcraft_legacy/_store.py index 8f264e687e..7bce81fe48 100644 --- a/snapcraft_legacy/_store.py +++ b/snapcraft_legacy/_store.py @@ -17,7 +17,6 @@ import contextlib import json import logging -import operator import os import re import subprocess @@ -369,34 +368,6 @@ def register( super().register(snap_name=snap_name, is_private=is_private, store_id=store_id) -def list_registered(): - account_info = StoreClientCLI().get_account_information() - snaps = [ - ( - name, - info["since"], - "private" if info["private"] else "public", - info["price"] or "-", - "-", - ) - for name, info in account_info["snaps"].get(DEFAULT_SERIES, {}).items() - # Presenting only approved snap registrations, which means name - # disputes will be displayed/sorted some other way. - if info["status"] == "Approved" - ] - - if not snaps: - echo.warning("There are no registered snaps.") - return - - tabulated_snaps = tabulate( - sorted(snaps, key=operator.itemgetter(0)), - headers=["Name", "Since", "Visibility", "Price", "Notes"], - tablefmt="plain", - ) - print(tabulated_snaps) - - def _get_usable_keys(name=None): snap_path = get_host_tool_path(command_name="snap", package_name="snapd") keys = json.loads( diff --git a/tests/legacy/fake_servers/api.py b/tests/legacy/fake_servers/api.py index 79067326fa..1fa32e7f96 100644 --- a/tests/legacy/fake_servers/api.py +++ b/tests/legacy/fake_servers/api.py @@ -1119,63 +1119,54 @@ def account(self, request): "snap-id": "snap-id", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "test-snap-with-no-validations": { "snap-id": "test-snap-id-with-no-validations", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "test-snap-with-dev": { "snap-id": "test-snap-id-with-dev", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "core": { "snap-id": "good", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "core-no-dev": { "snap-id": "no-dev", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "badrequest": { "snap-id": "badrequest", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "revoked": { "snap-id": "revoked", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "no-revoked": { "snap-id": "no-revoked", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "no-id": { "snap-id": None, "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, } @@ -1185,7 +1176,6 @@ def account(self, request): "snap-id": snap_data["snap_id"], "status": "Approved", "private": snap_data["private"], - "price": None, "since": "2016-12-12T01:01:01Z", } for name, snap_data in self.registered_names.items() diff --git a/tests/legacy/unit/store/test_store_client.py b/tests/legacy/unit/store/test_store_client.py index bb14afc614..6dcdf8e810 100644 --- a/tests/legacy/unit/store/test_store_client.py +++ b/tests/legacy/unit/store/test_store_client.py @@ -185,53 +185,45 @@ def test_get_account_information_successfully(self): "snap-id": "snap-id", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "core": { "snap-id": "good", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "core-no-dev": { "snap-id": "no-dev", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "badrequest": { "snap-id": "badrequest", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "no-revoked": { "snap-id": "no-revoked", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "revoked": { "snap-id": "revoked", "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, "test-snap-with-dev": { - "price": None, "private": False, "since": "2016-12-12T01:01:01Z", "snap-id": "test-snap-id-with-dev", "status": "Approved", }, "test-snap-with-no-validations": { - "price": None, "private": False, "since": "2016-12-12T01:01:01Z", "snap-id": "test-snap-id-with-no-validations", @@ -241,7 +233,6 @@ def test_get_account_information_successfully(self): "snap-id": None, "status": "Approved", "private": False, - "price": None, "since": "2016-12-12T01:01:01Z", }, }