network.py 1.72 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Copyright (C) 2012-2015 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15 16 17 18 19

from occi.backend import ActionBackend, KindBackend, MixinBackend
from occi.exceptions import HTTPError

class NetworkBackend(KindBackend, ActionBackend):
20
    """Network Backend for snf-occi-server"""
21
    def create(self, entity, extras):
22
        raise HTTPError(501, "Currently not supported.")
23 24 25

    def action(self, entity, action, attributes, extras):
        raise HTTPError(501, "Currently not supported.")
26 27


28 29
class IpNetworkBackend(MixinBackend):
    def create(self, entity, extras):
30 31
        raise HTTPError(501, "Currently not supported.")

32 33

class IpNetworkInterfaceBackend(MixinBackend):
34 35
    """Ip Network Interface Backend"""

36 37

class NetworkInterfaceBackend(KindBackend):
38

39
    def create(self, entity, extras):
40
        raise HTTPError(501, "Currently not supported.")
41 42 43 44 45

    def action(self, entity, action, attributes, extras):
        raise HTTPError(501, "Currently not supported.")

    def update(self, old, new, extras):
46
        raise HTTPError(501, "Currently not supported.")
47 48

    def replace(self, old, new, extras):
49
        raise HTTPError(501, "Currently not supported.")
50