3
>>> from zope.component import getUtility
4
>>> from lp.app.interfaces.launchpad import ILaunchpadCelebrities
5
>>> from lp.testing import celebrity_logged_in
3
6
>>> from lp.testing.sampledata import ADMIN_EMAIL
4
7
>>> login(ADMIN_EMAIL)
5
8
>>> owner = factory.makePerson()
58
61
... ppa_owner['ppas_collection_link']).jsonBody())
59
62
http://api.launchpad.dev/beta/~.../+archive/ppa
64
However, we can grant them commercial admin access:
66
>>> with celebrity_logged_in('admin'):
67
... comm = getUtility(ILaunchpadCelebrities).commercial_admin
68
... comm.addMember(owner, comm.teamowner)
69
(True, <DBItem TeamMembershipStatus.APPROVED, (2) Approved>)
71
Once they have commercial access, they can create private PPAs:
73
>>> print ppa_owner_webservice.named_post(
74
... ppa_owner['self_link'], 'createPPA', {}, name='secret',
75
... displayname='My secret new PPA', description='Secretness!',
81
Location: http://api.launchpad.dev/.../+archive/secret
84
And the PPA appears in their list of PPAs:
86
>>> print_self_link_of_entries(webservice.get(
87
... ppa_owner['ppas_collection_link']).jsonBody())
88
http://api.launchpad.dev/.../+archive/ppa
89
http://api.launchpad.dev/.../+archive/secret
91
And the PPA is, of course, private:
93
>>> ppa = ppa_owner_webservice.named_get(
94
... ppa_owner['self_link'], 'getPPAByName', name='secret').jsonBody()