예제 #1
0
func InspectServiceByService(srv *definitions.Service, ops *definitions.Operation, field string) error {
	err := perform.DockerInspect(srv, ops, field)
	if err != nil {
		return err
	}

	return nil
}
예제 #2
0
func InspectServiceByService(srv *definitions.Service, ops *definitions.Operation, field string) error {
	// if IsServiceExisting(srv, ops) {
	err := perform.DockerInspect(srv, ops, field)
	if err != nil {
		return err
	}
	// } else {
	// 	return fmt.Errorf("No service matching that name.\n")
	// }
	return nil
}
예제 #3
0
파일: manage.go 프로젝트: mxjxn/eris-cli
func InspectData(do *definitions.Do) error {
	if util.IsDataContainer(do.Name, do.Operations.ContainerNumber) {
		log.WithField("=>", do.Name).Info("Inspecting data container")

		srv := definitions.BlankServiceDefinition()
		srv.Operations.SrvContainerName = util.ContainersName(definitions.TypeData, do.Name, do.Operations.ContainerNumber)

		err := perform.DockerInspect(srv.Service, srv.Operations, do.Operations.Args[0])
		if err != nil {
			return err
		}
	} else {
		return fmt.Errorf("I cannot find that data container. Please check the data container name you sent me.")
	}
	do.Result = "success"
	return nil
}