mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
feat(pre-deploy): implement pre-deploy hook operations for deployment
This commit is contained in:
@@ -67,3 +67,11 @@ func (s *ClusterState) Machine(nameOrID string) (*Machine, bool) {
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// MachineName returns the machine name by ID from the cluster state. If the id is not found, ("", false) is returned.
|
||||
func (s *ClusterState) MachineName(id string) (string, bool) {
|
||||
if m, ok := s.Machine(id); ok {
|
||||
return m.Info.Name, true
|
||||
}
|
||||
return "", false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user