Esempio n. 1
0
func (h *RpcClient) Deploy(r *http.Request, args *rpc.SimpleArgs, reply *rpc.RpcReply) error {
	host.Active(args.Id)

	task.Trigger("host.Deploy")
	reply.Response = true
	return nil
}
Esempio n. 2
0
func (h *RpcClient) GetBackupList(r *http.Request, args *rpc.SimpleArgs, reply *rpc.RpcReply) error {
	host.Active(args.Id)
	result, err := host.GetBackupList()
	if err != nil {
		return err
	}
	reply.Response = result
	return nil
}
Esempio n. 3
0
func (h *RpcClient) Revert(r *http.Request, args *rpc.SimpleArgs, reply *rpc.RpcReply) error {
	host.Active(args.Id)

	err := host.Revert(args.Message)
	if err != nil {
		return err
	}
	reply.Response = true
	return nil
}
Esempio n. 4
0
func (h *RpcClient) ShowLog(r *http.Request, args *rpc.SimpleArgs, reply *rpc.RpcReply) error {
	host.Active(args.Id)
	output, err := host.ShowLog()
	reply.Response = output
	return err
}
Esempio n. 5
0
func (h *RpcClient) Update(r *http.Request, args *rpc.UpdateArgs, reply *rpc.RpcReply) error {
	host.Active(args.Id)
	reply.Response = host.Update(args)
	return nil
}