import os
from item import Item
from templaterule import TemplateRule

class ContactGroup(Item):

    id = 1 #0 is reserved for host (primary node for parents)
    my_type = 'contact_group'
    app_template = "app.tpl"

    template_rules = [
        TemplateRule(
            template="contactgroup",
            unique_attr="contactgroup_name", unique_config="contactgroup_%s",
        )
    ]


    def __init__(self, params={}):
        self.members = []
        super(ContactGroup, self).__init__(params)


    def __str__(self):
        return "contactgroup %s" % self.contactgroup_name


import os
from item import Item
from templaterule import TemplateRule

class ContactGroup(Item):

    id = 1 #0 is reserved for host (primary node for parents)
    my_type = 'contact_group'
    app_template = "app.tpl"

    template_rules = [
        TemplateRule(
            template="contactgroup",
            unique_attr="contactgroup_name", unique_config="contactgroup_%s",
        )
    ]


    def __init__(self, params={}):
        self.members = []
        super(ContactGroup, self).__init__(params)

    def fingerprint(self):
        return "%s" % (self.contactgroup_name, )

    def __str__(self):
        return "contactgroup %s" % self.contactgroup_name


add a fingerprint method to contactgroups