<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getRequestedNameIface(self, iface_num=0, num=None, default_hostname=None, default_domain=None):
 """Return the dns name associated to the net interface."""


        full_name = self.getValue("net_interface.%d.dns_name" % iface_num)

        if full_name:
            replaced_full_name = system.replaceTemplateName(full_name, num)
            (hostname, domain) = replaced_full_name
            if not domain:
                domain = default_domain
            return (hostname, domain)
        else:
            if default_hostname:
                (hostname, _) = system.replaceTemplateName(default_hostname, num)
                return (hostname, default_domain)
            else:
                return None