コード例 #1
0
ファイル: instancepoller.go プロジェクト: felicianotech/juju
// Machine provides access to methods of a state.Machine through the
// facade.
func (api *API) Machine(tag names.MachineTag) (*Machine, error) {
	life, err := common.Life(api.facade, tag)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &Machine{api.facade, tag, life}, nil
}
コード例 #2
0
ファイル: unit.go プロジェクト: imoapps/juju
// Refresh updates the cached local copy of the unit's data.
func (u *Unit) Refresh() error {
	life, err := common.Life(u.st.facade, u.tag)
	if err != nil {
		return err
	}
	u.life = life
	return nil
}
コード例 #3
0
ファイル: ipaddress.go プロジェクト: frankban/juju-tmp
// Refresh updates the cached local copy of the IP address's data.
func (a *IPAddress) Refresh() error {
	life, err := common.Life(a.facade, a.tag)
	if err != nil {
		return errors.Trace(err)
	}
	a.life = life
	return nil
}
コード例 #4
0
ファイル: machine.go プロジェクト: AlexisBruemmer/juju
// Refresh updates the cached local copy of the machine's data.
func (m *Machine) Refresh() error {
	life, err := common.Life(m.facade, m.tag)
	if err != nil {
		return errors.Trace(err)
	}
	m.life = life
	return nil
}
コード例 #5
0
ファイル: addresser.go プロジェクト: frankban/juju-tmp
// IPAddress provides access to methods of a state.IPAddress through the
// facade.
func (api *API) IPAddress(tag names.IPAddressTag) (*IPAddress, error) {
	// TODO(mue) Change approach to use bulk requests for retrieval
	// and later removal.
	life, err := common.Life(api.facade, tag)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &IPAddress{api.facade, tag, life}, nil
}
コード例 #6
0
ファイル: uniter.go プロジェクト: pmatulis/juju
// life requests the lifecycle of the given entity from the server.
func (st *State) life(tag names.Tag) (params.Life, error) {
	return common.Life(st.facade, tag)
}
コード例 #7
0
ファイル: provisioner.go プロジェクト: AlexisBruemmer/juju
// machineLife requests the lifecycle of the given machine from the server.
func (st *State) machineLife(tag names.MachineTag) (params.Life, error) {
	return common.Life(st.facade, tag)
}