~chicharreros/magicicada-protocol/1.0

« back to all changes in this revision

Viewing changes to ubuntuone/storageprotocol/volumes.py

  • Committer: Magicicada Bot
  • Author(s): Natalia
  • Date: 2018-04-08 19:46:34 UTC
  • mfrom: (169.1.1 update-copyright-headers)
  • Revision ID: magicicada_bot-20180408194634-ydg0ytcwmo683l2z
[r=nataliabidart] - Added proper copyright notices and coding headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- coding: utf-8 -*-
2
2
#
3
 
# Author: Natalia B. Bidart <natalia.bidart@canonical.com>
4
 
#
5
3
# Copyright 2009-2012 Canonical Ltd.
 
4
# Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros)
6
5
#
7
6
# This program is free software: you can redistribute it and/or modify it
8
7
# under the terms of the GNU Affero General Public License version 3,
28
27
# do not wish to do so, delete this exception statement from your
29
28
# version.  If you delete this exception statement from all source
30
29
# files in the program, then also delete it here.
 
30
 
31
31
"""The volumes abstraction."""
32
32
 
33
33
import uuid
34
34
 
35
35
from ubuntuone.storageprotocol import protocol_pb2
36
36
 
37
 
# these are valid, pylint: disable=C0103
38
37
_direction_prot2nice = {
39
38
    protocol_pb2.Shares.FROM_ME: "from_me",
40
39
    protocol_pb2.Shares.TO_ME: "to_me",
46
45
    protocol_pb2.Shares.MODIFY: "Modify",
47
46
}
48
47
_access_nice2prot = dict((y, x) for x, y in _access_prot2nice.items())
49
 
# pylint: enable=C0103
50
48
 
51
49
 
52
50
class Volume(object):