Fix not working changelog cache on Container

This commit is contained in:
Kota Kanbe
2016-09-20 20:29:02 +09:00
parent 97c3f5d642
commit e3fc3aa9d1
5 changed files with 17 additions and 14 deletions

View File

@@ -241,6 +241,15 @@ type ServerInfo struct {
Distro Distro
}
// GetServerName returns ServerName if this serverInfo is about host.
// If this serverInfo is abount a container, returns containerID@ServerName
func (s ServerInfo) GetServerName() string {
if len(s.Container.ContainerID) == 0 {
return s.ServerName
}
return fmt.Sprintf("%s@%s", s.Container.ContainerID, s.ServerName)
}
// Distro has distribution info
type Distro struct {
Family string