code: func EnsureSwitches(c context.Context, cfgs []*config.Datacenter, rackIds map[string]int64) error {
  	t := &SwitchesTable{}
  	t.racks = rackIds
  	if err := t.fetch(c); err != nil {
  		return errors.Annotate(err, "failed to fetch switches").Err()
  	}
  	if err := t.computeChanges(c, cfgs); err != nil {
  		return errors.Annotate(err, "failed to compute changes").Err()
  	}
  	if err := t.add(c); err != nil {
  		return errors.Annotate(err, "failed to add switches").Err()
  	}
  	if err := t.remove(c); err != nil {
  		return errors.Annotate(err, "failed to remove switches").Err()
  	}
  	if err := t.update(c); err != nil {
  		return errors.Annotate(err, "failed to update switches").Err()
  	}
  	return nil
  }
docs: // EnsureSwitches ensures the database contains exactly the given switches.