code: def add_hostname_cn(self):
          
          ip = unit_get('private-address')
          addresses = [ip]
          # If a vip is being used without os-hostname config or
          # network spaces then we need to ensure the local units
          # cert has the approriate vip in the SAN list
          vip = get_vip_in_network(resolve_network_cidr(ip))
          if vip:
              addresses.append(vip)
          self.hostname_entry = {
              'cn': get_hostname(ip),
              'addresses': addresses}
docs: Add a request for the hostname of the machine