Merge pull request #4804 from openanolis/anolis/merge_runtime_rs_to_main

runtime-rs:merge runtime rs to main
This commit is contained in:
Bin Liu
2022-08-11 08:40:41 +08:00
committed by GitHub
279 changed files with 40922 additions and 554 deletions

View File

@@ -46,6 +46,9 @@ const (
// ClhHypervisor is the ICH hypervisor.
ClhHypervisor HypervisorType = "clh"
// DragonballHypervisor is the Dragonball hypervisor.
DragonballHypervisor HypervisorType = "dragonball"
// MockHypervisor is a mock hypervisor for testing purposes
MockHypervisor HypervisorType = "mock"
@@ -169,6 +172,9 @@ func (hType *HypervisorType) Set(value string) error {
case "clh":
*hType = ClhHypervisor
return nil
case "dragonball":
*hType = DragonballHypervisor
return nil
case "mock":
*hType = MockHypervisor
return nil

View File

@@ -37,6 +37,8 @@ func NewHypervisor(hType HypervisorType) (Hypervisor, error) {
return &Acrn{}, nil
case ClhHypervisor:
return &cloudHypervisor{}, nil
case DragonballHypervisor:
return &mockHypervisor{}, nil
case MockHypervisor:
return &mockHypervisor{}, nil
default:

View File

@@ -96,7 +96,6 @@ func (endpoint *IPVlanEndpoint) NetworkPair() *NetworkInterfacePair {
// Attach for ipvlan endpoint bridges the network pair and adds the
// tap interface of the network pair to the hypervisor.
// tap interface of the network pair to the Hypervisor.
func (endpoint *IPVlanEndpoint) Attach(ctx context.Context, s *Sandbox) error {
span, ctx := ipvlanTrace(ctx, "Attach", endpoint)
defer span.End()