Class GrpcDesktopService
Implements the IGrpcDesktopService.
Implements
Namespace: Neon.Kube.DesktopService
Assembly: Neon.Kube.DesktopService.dll
Syntax
public class GrpcDesktopService : IGrpcDesktopService
Constructors
GrpcDesktopService()
Static constructor.
Declaration
public GrpcDesktopService()
Methods
AddVmAsync(GrpcAddVmRequest, CallContext)
Creates a virtual machine.
Declaration
public Task<GrpcBaseReply> AddVmAsync(GrpcAddVmRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcAddVmRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
AddVmDriveAsync(GrpcAddVmDriveRequest, CallContext)
Adds a drive to a virtual machine.
Declaration
public Task<GrpcBaseReply> AddVmDriveAsync(GrpcAddVmDriveRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcAddVmDriveRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
CompactDriveRequestAsync(GrpcCompactDriveRequest, CallContext)
Compacts a virtual disk.
Declaration
public Task<GrpcBaseReply> CompactDriveRequestAsync(GrpcCompactDriveRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcCompactDriveRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
EjectVmDvdAsync(GrpcEjectVmDvdRequest, CallContext)
Ejects any DVD/CD that's currently inserted into a virtual machine.
Declaration
public Task<GrpcBaseReply> EjectVmDvdAsync(GrpcEjectVmDvdRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcEjectVmDvdRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
FindIPAddressAsync(GrpcFindIPAddressRequest, CallContext)
Returns information about a virtual IP address.
Declaration
public Task<GrpcFindIPAddressReply> FindIPAddressAsync(GrpcFindIPAddressRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcFindIPAddressRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcFindIPAddressReply> |
FindNatByNameAsync(GrpcFindNatByNameRequest, CallContext)
Looks up a virtual Hyper-V NAT by name.
Declaration
public Task<GrpcFindNatReply> FindNatByNameAsync(GrpcFindNatByNameRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcFindNatByNameRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcFindNatReply> |
FindNatByNameSubnetAsync(GrpcFindNatBySubnetRequest, CallContext)
Looks up a virtual Hyper-V NAT by subnet.
Declaration
public Task<GrpcFindNatReply> FindNatByNameSubnetAsync(GrpcFindNatBySubnetRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcFindNatBySubnetRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcFindNatReply> |
FindSwitchAsync(GrpcGetSwitchRequest, CallContext)
Returns information about a specific Hyper-V virtual switch.
Declaration
public Task<GrpcGetSwitchReply> FindSwitchAsync(GrpcGetSwitchRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcGetSwitchRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcGetSwitchReply> |
FindVmAsync(GrpcGetVmRequest, CallContext)
Returns information about a specific virtual machine if it exists.
Declaration
public Task<GrpcGetVmReply> FindVmAsync(GrpcGetVmRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcGetVmRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcGetVmReply> | A GrpcGetVmReply with the results. |
GetWindowsOptionalFeaturesAsync(GrpcGetWindowsOptionalFeaturesRequest, CallContext)
Returns a dictionary mapping Windows features to their current status.
Declaration
public Task<GrpcGetWindowsOptionalFeaturesReply> GetWindowsOptionalFeaturesAsync(GrpcGetWindowsOptionalFeaturesRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcGetWindowsOptionalFeaturesRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcGetWindowsOptionalFeaturesReply> | A GrpcGetWindowsOptionalFeaturesReply holding the feature information. |
Exceptions
Type | Condition |
---|---|
GrpcServiceException | Thrown on errors. |
InsertVmDvdAsync(GrpcInsertVmDvdRequest, CallContext)
Inserts an ISO file as the DVD/CD for a virtual machine, ejecting any existing disc.
Declaration
public Task<GrpcBaseReply> InsertVmDvdAsync(GrpcInsertVmDvdRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcInsertVmDvdRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
IsNestedVirtualizationAsync(GrpcIsNestedVirtualizationRequest, CallContext)
Returns an indication as to whether Windows is running with nested virtualization.
Declaration
public Task<GrpcIsNestedVirtualizationReply> IsNestedVirtualizationAsync(GrpcIsNestedVirtualizationRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcIsNestedVirtualizationRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcIsNestedVirtualizationReply> | A GrpcIsNestedVirtualizationReply holding the feature information. |
Exceptions
Type | Condition |
---|---|
GrpcServiceException | Thrown on errors. |
ListLocalHostSections(GrpcListLocalHostsSectionsRequest, CallContext)
Lists the sections from the local $/etc/hosts file.
Declaration
public Task<GrpcListLocalHostsSectionsReply> ListLocalHostSections(GrpcListLocalHostsSectionsRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcListLocalHostsSectionsRequest | request | The request specifying how to modify the local hosts. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcListLocalHostsSectionsReply> |
ListNatsAsync(GrpcListNatsRequest, CallContext)
Lists the virtual Hyper-V NATs.
Declaration
public Task<GrpcListNatsReply> ListNatsAsync(GrpcListNatsRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcListNatsRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcListNatsReply> |
ListSwitchesAsync(GrpcListSwitchesRequest, CallContext)
Lists the Hyper-V virtual switches.
Declaration
public Task<GrpcListSwitchesReply> ListSwitchesAsync(GrpcListSwitchesRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcListSwitchesRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcListSwitchesReply> |
ListVmDrivesAsync(GrpcGetVmDrivesRequest, CallContext)
Returns information about a virtual machine's attached drives.
Declaration
public Task<GrpGetVmDrivesReply> ListVmDrivesAsync(GrpcGetVmDrivesRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcGetVmDrivesRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpGetVmDrivesReply> |
ListVmNetworkAdaptersAsync(GrpcGetVmNetworkAdaptersRequest, CallContext)
Returns information about the network adaptors attached to a virtual machine.
Declaration
public Task<GrpcGetVmNetworkAdaptersReply> ListVmNetworkAdaptersAsync(GrpcGetVmNetworkAdaptersRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcGetVmNetworkAdaptersRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcGetVmNetworkAdaptersReply> |
ListVmsAsync(GrpcListVmsRequest, CallContext)
Lists the Hyper-V virtual machines.
Declaration
public Task<GrpcListVmsReply> ListVmsAsync(GrpcListVmsRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcListVmsRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcListVmsReply> | A GrpcListVmsReply with the results. |
NewExternalSwitchAsync(GrpcNewExternalSwitchRequest, CallContext)
Creates a new external Hyper-V virtual switch.
Declaration
public Task<GrpcBaseReply> NewExternalSwitchAsync(GrpcNewExternalSwitchRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcNewExternalSwitchRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
NewInternalSwitchAsync(GrpcNewInternalSwitchRequest, CallContext)
Creates a new internal Hyper-V virtual switch.
Declaration
public Task<GrpcBaseReply> NewInternalSwitchAsync(GrpcNewInternalSwitchRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcNewInternalSwitchRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
RelayLogBatchAsync(GrpcRelayLogBatchRequest, CallContext)
Sends a batch of telemetry logs to the neon-desktop-service which will then forward them on to the headend.
Declaration
public Task<GrpcRelayLogBatchReply> RelayLogBatchAsync(GrpcRelayLogBatchRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcRelayLogBatchRequest | request | The request holding the batch of log records. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcRelayLogBatchReply> |
RelayTraceBatchAsync(GrpcRelayTraceBatchRequest, CallContext)
Sends a batch of telemetry traces to the neon-desktop-service which will then forward them on to the headend.
Declaration
public Task<GrpcRelayTraceBatchReply> RelayTraceBatchAsync(GrpcRelayTraceBatchRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcRelayTraceBatchRequest | request | The request holding the batch of traces. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcRelayTraceBatchReply> |
RemoveSwitchAsync(GrpcRemoveSwitchRequest, CallContext)
Removes a Hyper-V virtual switch.
Declaration
public Task<GrpcBaseReply> RemoveSwitchAsync(GrpcRemoveSwitchRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcRemoveSwitchRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
RemoveVmAsync(GrpcRemoveVmRequest, CallContext)
Removes a named virtual machine and all of its drives (by default).
Declaration
public Task<GrpcBaseReply> RemoveVmAsync(GrpcRemoveVmRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcRemoveVmRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> | A GrpcBaseReply indicating success or failure. |
SaveVmAsync(GrpcSaveVmRequest, CallContext)
Saves a virtual machine (AKA puts it to sleep).
Declaration
public Task<GrpcBaseReply> SaveVmAsync(GrpcSaveVmRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcSaveVmRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
StartVmAsync(GrpcStartVmRequest, CallContext)
Starts a virtual machine.
Declaration
public Task<GrpcBaseReply> StartVmAsync(GrpcStartVmRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcStartVmRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
StopVmAsync(GrpcStopVmRequest, CallContext)
Stops a virtual machine.
Declaration
public Task<GrpcBaseReply> StopVmAsync(GrpcStopVmRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcStopVmRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcBaseReply> |
VmExistsAsync(GrpcVmExistsRequest, CallContext)
Determines whether a virtual machine exists.
Declaration
public Task<GrpcVmExistsReply> VmExistsAsync(GrpcVmExistsRequest request, CallContext context = default)
Parameters
Type | Name | Description |
---|---|---|
GrpcVmExistsRequest | request | The request. |
CallContext | context | Optionally specifies the gRPC call context. |
Returns
Type | Description |
---|---|
Task<GrpcVmExistsReply> | A GrpcVmExistsReply with the result. |