Ejemplo n.º 1
0
def test_dhcpconf_location():
    # Arrange

    # Act
    result = utils.dhcpconf_location()

    # Assert
    assert result == "/etc/dhcpd.conf"
Ejemplo n.º 2
0
def test_dhcpv6conf_location():
    # TODO: Parameterize and check for wrong argument
    # Arrange

    # Act
    result = utils.dhcpconf_location(utils.DHCP.V6)

    # Assert
    assert result == "/etc/dhcpd6.conf"
Ejemplo n.º 3
0
 def __init__(self, collection_mgr, logger):
     """
     Constructor
     """
     self.logger = logger
     self.collection_mgr = collection_mgr
     self.api = collection_mgr.api
     self.distros = collection_mgr.distros()
     self.profiles = collection_mgr.profiles()
     self.systems = collection_mgr.systems()
     self.settings = collection_mgr.settings()
     self.repos = collection_mgr.repos()
     self.templar = templar.Templar(collection_mgr)
     self.settings_file = utils.dhcpconf_location(self.api)
Ejemplo n.º 4
0
 def __init__(self, collection_mgr, logger):
     """
     Constructor
     """
     self.logger = logger
     self.collection_mgr = collection_mgr
     self.api = collection_mgr.api
     self.distros = collection_mgr.distros()
     self.profiles = collection_mgr.profiles()
     self.systems = collection_mgr.systems()
     self.settings = collection_mgr.settings()
     self.repos = collection_mgr.repos()
     self.templar = templar.Templar(collection_mgr)
     self.settings_file = utils.dhcpconf_location(self.api)
Ejemplo n.º 5
0
    def __init__(self, collection_mgr):
        """
        Constructor

        :param collection_mgr: The collection manager to resolve all information with.
        """
        self.logger = logging.getLogger()
        self.collection_mgr = collection_mgr
        self.api = collection_mgr.api
        self.distros = collection_mgr.distros()
        self.profiles = collection_mgr.profiles()
        self.systems = collection_mgr.systems()
        self.settings = collection_mgr.settings()
        self.repos = collection_mgr.repos()
        self.templar = templar.Templar(collection_mgr)
        self.settings_file = utils.dhcpconf_location()
Ejemplo n.º 6
0
    def __init__(self, collection_mgr):
        super().__init__(collection_mgr)

        self.settings_file = utils.dhcpconf_location()
Ejemplo n.º 7
0
    def __init__(self, collection_mgr):
        super().__init__(collection_mgr)

        self.settings_file_v4 = utils.dhcpconf_location(utils.DHCP.V4)
        self.settings_file_v6 = utils.dhcpconf_location(utils.DHCP.V6)