# Path: sdn/helpers/session_flash.py
# def set_flash(request, message, message_type = "success"):
# def clear_flash(request):
# def get_flash(request):
# 
# Path: sdn/models/switch.py
# class Switch(BaseModel):
#     # Buffers
#     buffers = models.IntegerField()
# 
#     # Description
#     software = models.CharField(max_length=100)
#     hardware = models.CharField(max_length=100)
#     manufacturer = models.CharField(max_length=100)
#     serial_num = models.CharField(max_length=100)
#     datapath = models.CharField(max_length=100)
# 
#     # Capabilities
#     capabilities = models.IntegerField()
# 
#     # Inet Address
#     inet_address = models.CharField(max_length=100)
# 
#     # Connected Since
#     connected_since = models.BigIntegerField()
# 
#     # DPID
#     dpid = models.CharField(max_length=100, db_index=True)
# 
#     # Foreign key to controller
#     controller = models.ForeignKey(Controller)


import logging
from django.http import HttpResponse
from django.template import Context, loader
from django.contrib.auth.decorators import login_required
from sdn.helpers import session_flash
from sdn.models.switch import Switch

# Configure logging for the module name
logger = logging.getLogger(__name__)
active_menu = "Resources"

@login_required
def index(request):
    t = loader.get_template('switches.html')
    switch_list = Switch.objects.all()
    view_vars = {
        'active_menu': active_menu,
        'title': "Switches List"
    }
    c = Context({

# Path: sdn/helpers/session_flash.py
# def set_flash(request, message, message_type = "success"):
# def clear_flash(request):
# def get_flash(request):
# 
# Path: sdn/models/switch.py
# class Switch(BaseModel):
#     # Buffers
#     buffers = models.IntegerField()
# 
#     # Description
#     software = models.CharField(max_length=100)
#     hardware = models.CharField(max_length=100)
#     manufacturer = models.CharField(max_length=100)
#     serial_num = models.CharField(max_length=100)
#     datapath = models.CharField(max_length=100)
# 
#     # Capabilities
#     capabilities = models.IntegerField()
# 
#     # Inet Address
#     inet_address = models.CharField(max_length=100)
# 
#     # Connected Since
#     connected_since = models.BigIntegerField()
# 
#     # DPID
#     dpid = models.CharField(max_length=100, db_index=True)
# 
#     # Foreign key to controller
#     controller = models.ForeignKey(Controller)


# Path: sdn/views/resources/switches.py
import logging
from django.http import HttpResponse
from django.template import Context, loader
from django.contrib.auth.decorators import login_required
from sdn.helpers import session_flash
from sdn.models.switch import Switch


# Configure logging for the module name
logger = logging.getLogger(__name__)
active_menu = "Resources"

@login_required
def index(request):
    t = loader.get_template('switches.html')
    switch_list = Switch.objects.all()
    view_vars = {
        'active_menu': active_menu,
        'title': "Switches List"
    }
    c = Context({

        'switch_list': switch_list,