agent: add blank lines between methods

In rpc.rs, there are no blank lines between methods, this commit
add blank lines for these methods.

Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
bin liu 2020-10-10 12:37:34 +00:00 committed by Peng Tao
parent d3a36fa06f
commit 42c48f54ed

View File

@ -100,7 +100,6 @@ impl agentService {
// re-scan PCI bus // re-scan PCI bus
// looking for hidden devices // looking for hidden devices
rescan_pci_bus().context("Could not rescan PCI bus")?; rescan_pci_bus().context("Could not rescan PCI bus")?;
// Some devices need some extra processing (the ones invoked with // Some devices need some extra processing (the ones invoked with
@ -293,7 +292,6 @@ impl agentService {
let s = self.sandbox.clone(); let s = self.sandbox.clone();
let mut sandbox = s.lock().unwrap(); let mut sandbox = s.lock().unwrap();
// ignore string_user, not sure what it is
let process = if req.process.is_some() { let process = if req.process.is_some() {
req.process.as_ref().unwrap() req.process.as_ref().unwrap()
} else { } else {
@ -555,10 +553,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
ttrpc::Code::INTERNAL, ttrpc::Code::INTERNAL,
e.to_string(), e.to_string(),
))), ))),
Ok(_) => { Ok(_) => Ok(Empty::new()),
info!(sl!(), "exec process!\n");
Ok(Empty::new())
}
} }
} }
@ -575,6 +570,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(_) => Ok(Empty::new()), Ok(_) => Ok(Empty::new()),
} }
} }
fn exec_process( fn exec_process(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -588,6 +584,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(_) => Ok(Empty::new()), Ok(_) => Ok(Empty::new()),
} }
} }
fn signal_process( fn signal_process(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -601,6 +598,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(_) => Ok(Empty::new()), Ok(_) => Ok(Empty::new()),
} }
} }
fn wait_process( fn wait_process(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -614,6 +612,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(resp) => Ok(resp), Ok(resp) => Ok(resp),
} }
} }
fn list_processes( fn list_processes(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -700,6 +699,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
resp.process_list = Vec::from(result); resp.process_list = Vec::from(result);
Ok(resp) Ok(resp)
} }
fn update_container( fn update_container(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -739,6 +739,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(resp) Ok(resp)
} }
fn stats_container( fn stats_container(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -832,6 +833,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(resp) => Ok(resp), Ok(resp) => Ok(resp),
} }
} }
fn read_stdout( fn read_stdout(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -845,6 +847,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(resp) => Ok(resp), Ok(resp) => Ok(resp),
} }
} }
fn read_stderr( fn read_stderr(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -858,6 +861,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(resp) => Ok(resp), Ok(resp) => Ok(resp),
} }
} }
fn close_stdin( fn close_stdin(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -965,6 +969,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(iface) Ok(iface)
} }
fn update_routes( fn update_routes(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1000,6 +1005,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(routes) Ok(routes)
} }
fn list_interfaces( fn list_interfaces(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1028,6 +1034,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(interface) Ok(interface)
} }
fn list_routes( fn list_routes(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1057,6 +1064,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(routes) Ok(routes)
} }
fn start_tracing( fn start_tracing(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1065,6 +1073,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
info!(sl!(), "start_tracing {:?}", req); info!(sl!(), "start_tracing {:?}", req);
Ok(Empty::new()) Ok(Empty::new())
} }
fn stop_tracing( fn stop_tracing(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1175,6 +1184,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(Empty::new()) Ok(Empty::new())
} }
fn add_arp_neighbors( fn add_arp_neighbors(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1200,6 +1210,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(Empty::new()) Ok(Empty::new())
} }
fn online_cpu_mem( fn online_cpu_mem(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1217,6 +1228,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(Empty::new()) Ok(Empty::new())
} }
fn reseed_random_dev( fn reseed_random_dev(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1231,6 +1243,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(Empty::new()) Ok(Empty::new())
} }
fn get_guest_details( fn get_guest_details(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1259,6 +1272,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(resp) Ok(resp)
} }
fn mem_hotplug_by_probe( fn mem_hotplug_by_probe(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1273,6 +1287,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(Empty::new()) Ok(Empty::new())
} }
fn set_guest_date_time( fn set_guest_date_time(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1287,6 +1302,7 @@ impl protocols::agent_ttrpc::AgentService for agentService {
Ok(Empty::new()) Ok(Empty::new())
} }
fn copy_file( fn copy_file(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,
@ -1362,6 +1378,7 @@ impl protocols::health_ttrpc::Health for healthService {
Ok(resp) Ok(resp)
} }
fn version( fn version(
&self, &self,
_ctx: &ttrpc::TtrpcContext, _ctx: &ttrpc::TtrpcContext,