> We should assert the endpoints share a relation_type. In addition we now
> must have either one or two endpoints passed in, since we will eliminate the
> relation_type (and vestigial assign_service).
Sounds good. It doesn't ever make sense to create a relation without services, and
most probably, as we discussed yesterday, it doesn't make sense to assign new
services to an existing relation either.
[1]
Of course. I'm referring to the error checking you introduced in the branch as
a side effect of point 1 above. E.g.:
55 + if (topology. relation_ has_service( relation. internal_ relation_ id, relation. internal_ service_ id) or relation_ has_role( relation. internal_ relation_ id, relation. relation_ role)): AlreadyAssigned ( get_service_ name( relation. internal_ service_ id), relation. relation_ name, relation. relation_ role)
56 + service_
57 + service_
58 + topology.
59 + service_
60 + service_
61 + raise ServiceRelation
62 + topology.
63 + service_
64 + service_
65 + service_
[2]
> We should assert the endpoints share a relation_type. In addition we now
> must have either one or two endpoints passed in, since we will eliminate the
> relation_type (and vestigial assign_service).
Sounds good. It doesn't ever make sense to create a relation without services, and
most probably, as we discussed yesterday, it doesn't make sense to assign new
services to an existing relation either.