mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-14 06:06:12 +00:00
genpolicy: add default implementations for K8sResource trait
This commit adds default implementations for following methods of K8sResource trait: - generate_policy - serialize Fixes: #8960 Signed-off-by: Archana Choudhary <archana1@microsoft.com>
This commit is contained in:
parent
6edc3b6b0a
commit
4a010cf71b
@ -49,8 +49,13 @@ pub trait K8sResource {
|
||||
silent_unsupported_fields: bool,
|
||||
);
|
||||
|
||||
fn generate_policy(&self, agent_policy: &policy::AgentPolicy) -> String;
|
||||
fn serialize(&mut self, policy: &str) -> String;
|
||||
fn generate_policy(&self, _agent_policy: &policy::AgentPolicy) -> String {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
||||
fn serialize(&mut self, _policy: &str) -> String {
|
||||
panic!("Unsupported");
|
||||
}
|
||||
|
||||
fn get_sandbox_name(&self) -> Option<String> {
|
||||
panic!("Unsupported");
|
||||
|
Loading…
Reference in New Issue
Block a user