'Adds a host rule to the url map.'

def add_host_rule(self):

    bs_upsert = copy.deepcopy(self.__proto_upsert)
    hr = copy.deepcopy(bs_upsert['hostRules'][0])
    hr['hostPatterns'] = ['added.host1.com', 'added.host2.com']
    hr['pathMatcher']['pathRules'][0]['paths'] = ['/added/path']
    bs_upsert['hostRules'].append(hr)
    payload = self.agent.make_json_payload_from_kwargs(job=[bs_upsert], description=('Upsert    L7    Load    Balancer:    ' + self.__lb_name), application=self.TEST_APP)
    contract_builder = gcp.GcpContractBuilder(self.gcp_observer)
    self._add_contract_clauses(contract_builder, bs_upsert)
    return st.OperationContract(self.new_post_operation(title='add    host    rule', data=payload, path='tasks'), contract=contract_builder.build())
