def do_registrar(self, db, dry_run, change_master, offline):

        service, service_type, aliases = self.parse_service_info()
        instance_id, local_ip = aerostat.get_aws_data(offline)
        if change_master:
            self.change_master(
                    db, service, service_type, instance_id)

            return True

        hostname = self.pick_name(db, service, service_type, instance_id)
        change_host = False
        # If we successfully aquired a hostname (not dup) from mongodb
        if dry_run:
            logging.debug('DRY RUN: you would register with: %s' % hostname)

            return False

        if hostname:
            change_host = self.set_sys_hostname(hostname)
        if change_host:
            self.register_name(
                    db, hostname, local_ip, instance_id, service,
                    service_type, aliases)

        return True
Remove a server:port member from a servicegroup
dataset/ETHPy150Open urbanairship/aerostat/aerostat/registrar.py/Registrar.do_registrar--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/netscaler.py/servicegroup_server_delete