MCPcopy Create free account
hub / github.com/M2Team/NanaBox / ComputeSystemAddNetworkAdapter

Method ComputeSystemAddNetworkAdapter

NanaBox/ConfigurationManager.cpp:775–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

773}
774
775void NanaBox::ComputeSystemAddNetworkAdapter(
776 winrt::com_ptr<NanaBox::ComputeSystem> const& Instance,
777 NanaBox::NetworkAdapterConfiguration const& Configuration)
778{
779 nlohmann::json Result;
780
781 Result["ResourcePath"] = Mile::FormatString(
782 "VirtualMachine/Devices/NetworkAdapters/%s",
783 Configuration.EndpointId.c_str());
784 Result["RequestType"] = "Add";
785 Result["Settings"] = NanaBox::MakeHcsNetworkAdapterConfiguration(
786 Configuration);
787
788 Instance->Modify(winrt::to_hstring(Result.dump()));
789}
790
791void NanaBox::ComputeSystemRemoveNetworkAdapter(
792 winrt::com_ptr<NanaBox::ComputeSystem> const& Instance,

Callers

nothing calls this directly

Calls 1

ModifyMethod · 0.80

Tested by

no test coverage detected