예제 #1
0
파일: manage.go 프로젝트: mxjxn/eris-cli
func PortsChain(do *definitions.Do) error {
	chain, err := loaders.LoadChainDefinition(do.Name, false, do.Operations.ContainerNumber)
	if err != nil {
		return err
	}

	if IsChainExisting(chain) {
		log.WithField("=>", chain.Name).Debug("Getting chain port mapping")
		return util.PrintPortMappings(chain.Operations.SrvContainerID, do.Operations.Args)
	}

	return nil
}
예제 #2
0
func PortsService(do *definitions.Do) error {
	service, err := loaders.LoadServiceDefinition(do.Name, false, do.Operations.ContainerNumber)
	if err != nil {
		return err
	}

	if IsServiceExisting(service.Service, service.Operations) {
		log.Debug("Service exists, getting port mapping")
		return util.PrintPortMappings(service.Operations.SrvContainerID, do.Operations.Args)
	}

	return nil
}
예제 #3
0
func PortsChain(do *definitions.Do) error {
	chain, err := loaders.LoadChainDefinition(do.Name, false, do.Operations.ContainerNumber)
	if err != nil {
		return err
	}

	if IsChainExisting(chain) {
		logger.Debugf("Chain exists, getting port mapping.\n")
		return util.PrintPortMappings(chain.Operations.SrvContainerID, do.Operations.Args)
	}

	return nil
}