# -*- coding: utf-8 -*-
# Copyright (c) 2012 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
__author__ = 'florian'

from datetime import datetime
from fixture import DataSet

class DormitoryData(DataSet):
    class dummy_house1:
        number = "01"
        short_name = "abc"
        street = "dummy"
    class dummy_house2:
        number = "02"
        short_name = "def"
        street = "dummy"


class RoomData(DataSet):
    class dummy_room1:
        number = 1
        level = 1
        inhabitable = True
        dormitory = DormitoryData.dummy_house1
    class dummy_room2:
        number = 2
        level = 2
        inhabitable = True
        dormitory = DormitoryData.dummy_house2
    class dummy_room3:
        number = 2
        level = 2
        inhabitable = True
        dormitory = DormitoryData.dummy_house1


class UserData(DataSet):
    class dummy_user1:
        login = "test"
        name = "John Doe"
        registration_date = datetime.now()
        room = RoomData.dummy_room1


class HostData(DataSet):
    class dummy_host1:
        hostname = "host1"
        user = UserData.dummy_user1
        room = RoomData.dummy_room1


class NetDeviceData(DataSet):
    class dummy_device:
        mac = "00:00:00:00:00:00"
        host = HostData.dummy_host1

class PatchPortData(DataSet):
    class dummy_patch_port:
        room = RoomData.dummy_room2



@@ -308,16 +308,111 @@
 ataSet%0A%0A
+class VLanData(DataSet):%0A    class vlan_dummy1:%0A        name = %22vlan_dom_2%22%0A        tag = %221%22%0A%0A
 class Do
@@ -629,16 +629,55 @@
 %22dummy%22%0A
+        vlans = %5BVLanData.vlan_dummy1%5D%0A
 %0A%0Aclass 
@@ -1272,24 +1272,195 @@
 ummy_room1%0A%0A
+    class dummy_user2:%0A        login = %22admin%22%0A        name = %22Sebsatian fucking Schrader%22%0A        registration_date = datetime.now()%0A        room = RoomData.dummy_room3%0A%0A
 %0Aclass HostD
@@ -1778,16 +1778,17 @@
 tch_port
+1
 :%0A      
@@ -1819,8 +1819,582 @@
 room
-2%0A%0A
+1%0A        name = %22A20%22%0A    class dummy_patch_port2:%0A        room = RoomData.dummy_room2%0A        name = %22B25%22%0A%0Aclass SubnetData(DataSet):%0A    class dummy_subnet1:%0A        address = %22141.30.216.0/24%22%0A        gateway = %22141.30.216.1%22%0A        ip_type = %224%22%0A    class dummy_subnet2:%0A        address = %22141.30.203.0/24%22%0A        gateway = %22141.30.203.1%22%0A        ip_type = %224%22%0A        vlans = %5BVLanData.vlan_dummy1%5D%0A%0Aclass IpData(DataSet):%0A    class dummy_ip1:%0A        address = %22141.30.216.203%22%0A        net_device = NetDeviceData.dummy_device%0A        subnet = SubnetData.dummy_subnet1
 %0A

add some new fixture data to user-fixtures