// machineGroupName returns the machine group name
// derived from the model UUID and the machine ID
324501
func (f Firewall) machineGroupName(machineId string) string {
	return fmt.Sprintf("juju-%s-%s", f.environ.Config().UUID(), machineId)
}
22500
func (st *State) DistributionGroupByMachineId(tags ...names.MachineTag) ([]DistributionGroupResult, error) {
	var stringResults params.StringsResults
	entities := make([]params.Entity, len(tags))
	for i, t := range tags {
		entities[i] = params.Entity{Tag: t.String()}
	}
	err := st.facade.FacadeCall("DistributionGroupByMachineId", params.Entities{Entities: entities}, &stringResults)
	if err != nil {
		return []DistributionGroupResult{}, err
	}
	results := make([]DistributionGroupResult, len(tags))
	for i, stringResult := range stringResults.Results {
		results[i] = DistributionGroupResult{MachineIds: stringResult.Result, Err: stringResult.Error}
	}
	return results, nil
}
266686
func (s *GroupDetail) SetGroupName(v string) *GroupDetail {
	s.GroupName = &v
	return s
}
403769
func (s *ComposeEnvironmentsInput) SetGroupName(v string) *ComposeEnvironmentsInput {
	s.GroupName = &v
	return s
}
772272
func (s *PutGroupPolicyInput) SetGroupName(v string) *PutGroupPolicyInput {
	s.GroupName = &v
	return s
}
507217
func GetMachineName() string {
	if viper.GetString(MachineProfile) == "" {
		return constants.DefaultMachineName
	}
	return viper.GetString(MachineProfile)
}
348980
func (s *GetServiceGraphInput) SetGroupName(v string) *GetServiceGraphInput {
	s.GroupName = &v
	return s
}
319352
func (s *CloudWatchLogsConfig) SetGroupName(v string) *CloudWatchLogsConfig {
	s.GroupName = &v
	return s
}
237100
func (s *Group) SetGroupName(v string) *Group {
	s.GroupName = &v
	return s
}
1244390
func (v *volumeAttachmentPlan) Machine() names.MachineTag {
	return names.NewMachineTag(v.doc.Machine)
}
475868
func (s *AdminAddUserToGroupInput) SetGroupName(v string) *AdminAddUserToGroupInput {
	s.GroupName = &v
	return s
}
974540
func (b *KopsModelContext) AutoscalingGroupName(ig *kops.InstanceGroup) string {
	switch ig.Spec.Role {
	case kops.InstanceGroupRoleMaster:
		// We need to keep this back-compatible, so we introduce the masters name,
		// though the IG name suffices for uniqueness, and with sensible naming masters
		// should be redundant...
		return ig.ObjectMeta.Name + ".masters." + b.ClusterName()
	case kops.InstanceGroupRoleNode, kops.InstanceGroupRoleBastion:
		return ig.ObjectMeta.Name + "." + b.ClusterName()

	default:
		glog.Fatalf("unknown InstanceGroup Role: %v", ig.Spec.Role)
		return ""
	}
}
263597
func (c *Client) Machine(tag names.MachineTag) (MutaterMachine, error) {
	life, err := common.OneLife(c.facade, tag)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &Machine{c.facade, tag, life}, nil
}
188442
func (u *Unit) MachineId() string {
	u.mu.Lock()
	defer u.mu.Unlock()
	return u.details.MachineId
}
277427
func (sf *statusFormatter) MachineFormat(machineId []string) formattedMachineStatus {
	if sf.status == nil {
		return formattedMachineStatus{}
	}
	out := formattedMachineStatus{
		Model:    sf.status.Model.Name,
		Machines: make(map[string]machineStatus),
	}
	for k, m := range sf.status.Machines {
		if len(machineId) != 0 {
			for i := 0; i < len(machineId); i++ {
				if m.Id == machineId[i] {
					out.Machines[k] = sf.formatMachine(m)
				}
			}
		} else {
			out.Machines[k] = sf.formatMachine(m)
		}
	}
	return out
}
185216
func (b *KopsModelContext) SecurityGroupName(role kops.InstanceGroupRole) string {
	switch role {
	case kops.InstanceGroupRoleBastion:
		return "bastion." + b.ClusterName()
	case kops.InstanceGroupRoleNode:
		return "nodes." + b.ClusterName()
	case kops.InstanceGroupRoleMaster:
		return "masters." + b.ClusterName()
	default:
		glog.Fatalf("unknown role: %v", role)
		return ""
	}
}
1041221
func (s *RevokeClusterSecurityGroupIngressInput) SetClusterSecurityGroupName(v string) *RevokeClusterSecurityGroupIngressInput {
	s.ClusterSecurityGroupName = &v
	return s
}