Merge lp:~jamesh/storage-framework/fix-fake-oa into lp:storage-framework/devel

Proposed by James Henstridge
Status: Merged
Approved by: Michi Henning
Approved revision: 94
Merged at revision: 93
Proposed branch: lp:~jamesh/storage-framework/fix-fake-oa
Merge into: lp:storage-framework/devel
Diff against target: 194 lines (+2/-159)
2 files modified
tests/utils/com.ubuntu.OnlineAccounts.Manager.xml (+0/-153)
tests/utils/fake-online-accounts-daemon.py (+2/-6)
To merge this branch: bzr merge lp:~jamesh/storage-framework/fix-fake-oa
Reviewer Review Type Date Requested Status
unity-api-1-bot continuous-integration Approve
Michi Henning (community) Approve
Review via email: mp+310962@code.launchpad.net

Commit message

Update fake-online-accounts-daemon.py to work with online-accounts-api 0.1+17.04.20161110-0ubuntu1

Description of the change

Update fake-online-accounts-daemon.py to work with online-accounts-api 0.1+17.04.20161110-0ubuntu1

To post a comment you must log in.
94. By James Henstridge

Remove copy of online accounts introspection XML.

Revision history for this message
Michi Henning (michihenning) wrote :

Looks good, thanks!

review: Approve
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:93
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/202/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1083
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1090
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/880
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/880/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/880
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/880/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/880
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/880/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/880
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/880/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/880
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/880/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/880
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/880/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/202/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'tests/utils/com.ubuntu.OnlineAccounts.Manager.xml'
2--- tests/utils/com.ubuntu.OnlineAccounts.Manager.xml 2016-07-12 02:25:26 +0000
3+++ tests/utils/com.ubuntu.OnlineAccounts.Manager.xml 1970-01-01 00:00:00 +0000
4@@ -1,153 +0,0 @@
5-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
6-"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
7-
8-<node name="/com/ubuntu/OnlineAccounts/Manager">
9- <interface name="com.ubuntu.OnlineAccounts.Manager">
10-
11- <!--
12- Global concepts:
13-
14- Clients are identified by their "applicationId", which is the
15- "<package>_<app>" of the client.
16-
17- The "serviceId" is an application-specific name for an account provider.
18- That is, the "serviceId" contains the information about the application
19- which will use it, and the account provider (e.g. "google", "facebook").
20- "serviceId"s are backed by files shipped with the application, which can
21- contain application/account-provider specific information, such as the
22- ClientId and ClientSecret to be used when authentication with OAuth 2.0.
23- An application can ship more than one "serviceId", if they refer to
24- different account providers; that is, one application can have a
25- serviceId for Google and one for Facebook, but the same application
26- cannot have one for GMail and another for Picasa.
27- -->
28-
29- <!--
30- GetAccounts: returns a list of account IDs that satisfy the given
31- filters.
32-
33- Allowed keys for the "filters" parameter (any combination is allowed,
34- though not all combinations might make sense):
35-
36- - "applicationId" ("s"): the "<package>_<app>" of the client. An
37- unconfined application can specify this in order to restrict the set
38- of results to only those accounts that the application has been
39- authorized to use. For confined apps, OA will deduce the
40- applicationId from the apparmor label of the caller.
41-
42- - "serviceId" ("s"): if the application wants to list only those
43- accounts coming from a specific provider (e.g., "Facebook").
44-
45- - "accountId" ("u"): the ID of an account.
46-
47- In any case, an application will receive only those accounts which the
48- user has authorized the application to use. See
49- http://wiki.ubuntu.com/OnlineAccounts
50- for an overview of the UI experience.
51-
52- Disabled accounts will not be returned.
53- -->
54- <method name="GetAccounts">
55- <arg name="filters" type="a{sv}" direction="in" />
56- <!--
57- The return value is a list of account IDs paired with a dictionary of account data.
58- This will always include:
59- - "serviceId" (s)
60- - "displayName" (s)
61- Other settings stored on the account will also be included, such as the
62- server address and port of an owncloud or IMAP account, but we haven't
63- defined exactly how. Possibly, all account-specific keys will be
64- prefixed by "settings/", in order not to clash with the keys defined at
65- the framework level.
66- -->
67- <arg name="accounts" type="a(ua{sv})" direction="out" />
68- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
69- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0"
70- value="QList&lt;AccountInfo&gt;"/>
71- </method>
72-
73- <!--
74- Authenticate: request authentication credentials for the given
75- account ID in the context of a particular service.
76-
77- If "interactive" is false, an error will be returned if
78- user interaction would be required to retrieve the
79- credentials.
80-
81- If "invalidate" is true, any stored credentials will be
82- ignored and new credentials will be requested from the account
83- provider.
84- -->
85- <method name="Authenticate">
86- <arg name="accountId" type="u" direction="in" />
87- <arg name="serviceId" type="s" direction="in" />
88- <arg name="interactive" type="b" direction="in" />
89- <arg name="invalidate" type="b" direction="in" />
90- <!--
91- This dictionary can be used to specify OAuth client keys or permission
92- scopes. While it's possible to statically define them a the "serviceId"
93- level, some apps might want to change this information at runtime.
94- Possible use cases:
95- 1) OAuth keys are retrieved from a server (so that they can be updated
96- when the old ones are revoked).
97- 2) An app might want to use different keys when talking to GMail and
98- Picasa.
99- 3) The scope list can also be dynamic, and depending on how the user is
100- using the app.
101- 4) SASL: the parameters would contain the latest challenge got from the
102- server.
103- -->
104- <arg name="parameters" type="a{sv}" direction="in" />
105- <arg name="credentials" type="a{sv}" direction="out" />
106- <annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QVariantMap"/>
107- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
108- </method>
109-
110- <!--
111- RequestAccess: register a new account for use with the given
112- service.
113- This method also performs the authentication, since that's what apps
114- would do as soon as they get the account.
115- -->
116- <method name="RequestAccess">
117- <arg name="serviceId" type="s" direction="in" />
118- <arg name="parameters" type="a{sv}" direction="in" />
119- <arg name="account" type="(ua{sv})" direction="out" />
120- <arg name="credentials" type="a{sv}" direction="out" />
121- <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
122- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="AccountInfo"/>
123- <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
124- </method>
125-
126- <!--
127- AccountChanged: emitted when account details are changed.
128-
129- The apparmor policy will NOT ALLOW confined applications to receive
130- this signal on the account manager object path (which might be
131- /com/ubuntu/OnlineAccounts/Manager). Only unconfined applications will
132- be able to listen to this signal from that object path.
133-
134- Confined apps will have to catch this signal from a different object path:
135- /com/ubuntu/OnlineAccounts/Manager/@{APP_PKGNAME_DBUS}, which will
136- deliver the signal only for those accounts which the app has been
137- authorized to use.
138- -->
139- <signal name="AccountChanged">
140- <!--
141- The serviceId will also be included in the "account" dictionary. The
142- reason for having it also here is to allow clients to filter D-Bus
143- messages by arg0. This can be important for unconfined clients, which
144- would otherwise be woken up by any account change, even those not
145- relevant to them.
146- -->
147- <arg name="serviceId" type="s" />
148- <!--
149- The dictionary contains a changeType key, type "u", whose value is
150- enum { enabled, disabled, changed }
151- -->
152- <arg name="account" type="(ua{sv})" />
153- <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="AccountInfo"/>
154- </signal>
155-
156- </interface>
157-</node>
158
159=== modified file 'tests/utils/fake-online-accounts-daemon.py'
160--- tests/utils/fake-online-accounts-daemon.py 2016-11-01 03:36:29 +0000
161+++ tests/utils/fake-online-accounts-daemon.py 2016-11-16 06:09:36 +0000
162@@ -17,7 +17,6 @@
163
164 """A fake version of the OnlineAccounts D-Bus service."""
165
166-import os
167 import sys
168
169 import dbus.service
170@@ -28,9 +27,6 @@
171 OBJECT_PATH = "/com/ubuntu/OnlineAccounts/Manager"
172 OA_IFACE = "com.ubuntu.OnlineAccounts.Manager"
173
174-INTERFACE_XML = os.path.join(os.path.dirname(__file__),
175- "com.ubuntu.OnlineAccounts.Manager.xml")
176-
177 AUTH_OAUTH1 = 1
178 AUTH_OAUTH2 = 2
179 AUTH_PASSWORD = 3
180@@ -114,12 +110,12 @@
181 self.accounts = accounts
182
183 @dbus.service.method(dbus_interface=OA_IFACE,
184- in_signature="a{sv}", out_signature="a(ua{sv})")
185+ in_signature="a{sv}", out_signature="a(ua{sv})aa{sv}")
186 def GetAccounts(self, filters):
187 #print("GetAccounts %r" % filters)
188 sys.stdout.flush()
189 return dbus.Array([a.serialise() for a in self.accounts],
190- signature="a(ua{sv})")
191+ signature="a(ua{sv})"), dbus.Array(signature="a{sv}")
192
193 @dbus.service.method(dbus_interface=OA_IFACE,
194 in_signature="usbba{sv}", out_signature="a{sv}")

Subscribers

People subscribed via source and target branches