summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge L. Williams <jorge.williams@rackspace.com>2011-04-21 00:38:29 -0500
committerJorge L. Williams <jorge.williams@rackspace.com>2011-04-21 00:38:29 -0500
commitb2f7db8df83b62061b98982f2f33e2147bbf500c (patch)
treec990d22b5b2d45914b872beb35f91558ddbd25c5
parentd28a2588456fde0f44da6db481772fef1ace2550 (diff)
downloadkeystone-b2f7db8df83b62061b98982f2f33e2147bbf500c.tar.gz
keystone-b2f7db8df83b62061b98982f2f33e2147bbf500c.tar.xz
keystone-b2f7db8df83b62061b98982f2f33e2147bbf500c.zip
Initial atom link type.
-rw-r--r--keystone/logic/types/atom.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/keystone/logic/types/atom.py b/keystone/logic/types/atom.py
new file mode 100644
index 00000000..e9066ae9
--- /dev/null
+++ b/keystone/logic/types/atom.py
@@ -0,0 +1,45 @@
+# Copyright (c) 2010-2011 OpenStack, LLC.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+class Link(object):
+ "An atom link"
+
+ def __init__(self, rel, href, link_type=None, hreflang=None, title=None):
+ self.__rel = rel
+ self.__href = href
+ self.__link_type = link_type
+ self.__hreflang = hreflang
+ self.__title = title
+
+ @property
+ def rel(self):
+ return self.__rel
+
+ @property
+ def href(self):
+ return self.__href
+
+ @property
+ def link_type(self):
+ return self.__link_type
+
+ @property
+ def hreflang(self):
+ return self.__hreflang
+
+ @property
+ def title(self):
+ return self.__title