зеркало из https://github.com/microsoft/moc.git
364 строки
8.0 KiB
Protocol Buffer
364 строки
8.0 KiB
Protocol Buffer
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the Apache v2.0 license.
|
|
|
|
syntax = "proto3";
|
|
option go_package = "github.com/microsoft/moc/rpc/common";
|
|
|
|
package moc;
|
|
import "google/protobuf/descriptor.proto";
|
|
|
|
enum Operation {
|
|
GET = 0;
|
|
POST = 1;
|
|
DELETE = 2;
|
|
UPDATE = 3;
|
|
IMPORT = 4;
|
|
EXPORT = 5;
|
|
VALIDATE = 6;
|
|
}
|
|
|
|
enum ProvisionState {
|
|
UNKNOWN = 0;
|
|
CREATING = 1;
|
|
CREATED = 2;
|
|
CREATE_FAILED = 3;
|
|
DELETING = 4;
|
|
DELETE_FAILED = 5;
|
|
DELETED = 6;
|
|
UPDATING = 7;
|
|
UPDATE_FAILED = 8;
|
|
UPDATED = 9;
|
|
PROVISIONING = 10;
|
|
PROVISIONED = 11;
|
|
PROVISION_FAILED = 12;
|
|
DEPROVISIONING = 13;
|
|
DEPROVISIONED = 14;
|
|
DEPROVISION_FAILED = 15;
|
|
DELETE_PENDING = 16;
|
|
IMPORTING = 17;
|
|
IMPORTED = 18;
|
|
IMPORT_FAILED = 19;
|
|
}
|
|
|
|
enum HighAvailabilityState {
|
|
UNKNOWN_HA_STATE = 0;
|
|
STABLE = 1;
|
|
PENDING = 2;
|
|
}
|
|
|
|
enum HealthState {
|
|
NOTKNOWN = 0;
|
|
OK = 1;
|
|
WARNING = 2;
|
|
CRITICAL = 3;
|
|
// The entity went missing from the platform
|
|
MISSING = 4;
|
|
DEGRADED = 5;
|
|
// The entity went missing from the agent
|
|
NOTFOUND = 6;
|
|
}
|
|
|
|
message Error {
|
|
string Message = 1;
|
|
int32 Code = 2;
|
|
string Parameters = 3;
|
|
}
|
|
|
|
message ProvisionStatus {
|
|
ProvisionState currentState = 1;
|
|
ProvisionState previousState = 2;
|
|
}
|
|
|
|
message DownloadStatus {
|
|
int64 progressPercentage = 1;
|
|
int64 downloadSizeInBytes = 2;
|
|
int64 fileSizeInBytes = 3;
|
|
}
|
|
|
|
message Health {
|
|
HealthState currentState = 1;
|
|
HealthState previousState = 2;
|
|
}
|
|
|
|
enum ValidationStateCode {
|
|
NODE_UNREACHABLE = 0;
|
|
ENTITY_MISSING = 1;
|
|
CLIENT_CREATION_FAILURE = 2;
|
|
FORMAT_INVALID = 3;
|
|
INFO_MISSING = 4;
|
|
INFO_MISMATCH = 5;
|
|
}
|
|
|
|
message ValidationState {
|
|
ValidationStateCode code = 1;
|
|
string message = 2;
|
|
string recommendation = 3;
|
|
}
|
|
|
|
message ValidationStatus {
|
|
repeated ValidationState validationState = 1;
|
|
}
|
|
|
|
message Version {
|
|
string number = 1;
|
|
}
|
|
|
|
message Status {
|
|
Health health = 1;
|
|
ProvisionStatus provisioningStatus = 2;
|
|
Error lastError = 3;
|
|
Version version = 4;
|
|
DownloadStatus downloadStatus = 5;
|
|
ValidationStatus validationStatus = 6;
|
|
}
|
|
|
|
message Entity {
|
|
bool IsPlaceholder = 1; // On a multi-node system, the entity (such as a VM) is created on a node where
|
|
// IsPlacehoder is false. On all the other nodes, IsPlaceholder is set to true.
|
|
// When an entity moves among these nodes (such as when a VM migrates), the
|
|
// IsPlacehoder property is updated accordingly on all the nodes.
|
|
// IsPlacehoder therefore defines where the entity (VM) is *not* located.
|
|
// This property is the exact inverse of the node agent's SystemOwned property.
|
|
}
|
|
|
|
message Tag {
|
|
string key = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message Tags {
|
|
repeated Tag tags = 1;
|
|
}
|
|
|
|
enum ClientType {
|
|
CONTROLPLANE = 0;
|
|
EXTERNALCLIENT = 1;
|
|
NODE = 2;
|
|
ADMIN = 3;
|
|
BAREMETAL = 4;
|
|
LOADBALANCER = 5;
|
|
HOST = 6;
|
|
}
|
|
|
|
enum AuthenticationType {
|
|
SELFSIGNED = 0;
|
|
CASIGNED = 1;
|
|
}
|
|
|
|
enum ProviderType {
|
|
AnyProvider = 0;
|
|
VirtualMachine = 1;
|
|
VirtualMachineScaleSet = 2;
|
|
LoadBalancer = 3;
|
|
VirtualNetwork = 4;
|
|
VirtualHardDisk = 5;
|
|
GalleryImage = 6;
|
|
VirtualMachineImage = 7;
|
|
NetworkInterface = 8;
|
|
Certificate = 9;
|
|
Key = 10;
|
|
Secret = 11;
|
|
KeyVault = 12;
|
|
Identity = 13;
|
|
Role = 14;
|
|
RoleAssignment = 15;
|
|
Kubernetes = 16;
|
|
Cluster = 17;
|
|
ControlPlane = 18;
|
|
Group = 19;
|
|
Node = 20;
|
|
Location = 21;
|
|
StorageContainer = 22;
|
|
StorageFile = 23;
|
|
StorageDirectory = 24;
|
|
Subscription = 25;
|
|
VipPool = 26;
|
|
MacPool = 27;
|
|
EtcdCluster = 28;
|
|
EtcdServer = 29;
|
|
BareMetalMachine = 30;
|
|
CredentialMonitor = 31;
|
|
Logging = 32;
|
|
Recovery = 33;
|
|
Debug = 34;
|
|
BareMetalHost = 35;
|
|
Authentication = 36;
|
|
HealthMonitor = 37;
|
|
LogicalNetwork = 38;
|
|
AvailabilitySet = 39;
|
|
NetworkSecurityGroup = 40;
|
|
Zone = 41;
|
|
}
|
|
|
|
// Operations specific to a provider
|
|
// Format is [Provider]_[Operation]
|
|
enum ProviderAccessOperation {
|
|
Unspecified = 0;
|
|
|
|
Authentication_Login = 100;
|
|
|
|
Certificate_Create = 200;
|
|
Certificate_Update = 201;
|
|
Certificate_Get = 202;
|
|
Certificate_Delete = 203;
|
|
Certificate_Sign = 204;
|
|
Certificate_Renew = 205;
|
|
|
|
Identity_Create = 300;
|
|
Identity_Update = 301;
|
|
Identity_Revoke = 302;
|
|
Identity_Rotate = 303;
|
|
|
|
IdentityCertificate_Create = 400;
|
|
IdentityCertificate_Update = 401;
|
|
IdentityCertificate_Renew = 402;
|
|
|
|
Key_Create = 500;
|
|
Key_Update = 501;
|
|
Key_Encrypt = 502;
|
|
Key_Decrypt = 503;
|
|
Key_WrapKey = 504;
|
|
Key_UnwrapKey = 505;
|
|
Key_Sign = 506;
|
|
Key_Verify = 507;
|
|
|
|
VirtualMachine_Create = 600;
|
|
VirtualMachine_Update = 601;
|
|
VirtualMachine_Delete = 602;
|
|
VirtualMachine_Validate = 603;
|
|
VirtualMachine_Start = 604;
|
|
VirtualMachine_Stop = 605;
|
|
VirtualMachine_Reset = 606;
|
|
VirtualMachine_Repair_Guest_Agent = 607;
|
|
VirtualMachine_Pause = 608;
|
|
VirtualMachine_Save = 609;
|
|
|
|
Cluster_Create = 700;
|
|
Cluster_Update = 701;
|
|
Cluster_LoadCluster = 702;
|
|
Cluster_UnloadCluster = 703;
|
|
Cluster_GetCluster = 704;
|
|
Cluster_GetNodes = 705;
|
|
|
|
Debug_DebugServer = 800;
|
|
Debug_StackTrace = 801;
|
|
|
|
BaremetalHost_Create = 900;
|
|
BaremetalHost_Update = 901;
|
|
|
|
BaremetalMachine_Create = 1000;
|
|
BaremetalMachine_Update = 1001;
|
|
|
|
ControlPlane_Create = 1100;
|
|
ControlPlane_Update = 1101;
|
|
|
|
EtcdCluster_Create = 1200;
|
|
EtcdCluster_Update = 1201;
|
|
|
|
EtcdServer_Create = 1300;
|
|
EtcdServer_Update = 1301;
|
|
|
|
GalleryImage_Create = 1400;
|
|
GalleryImage_Update = 1401;
|
|
|
|
Group_Create = 1500;
|
|
Group_Update = 1501;
|
|
|
|
KeyVault_Create = 1600;
|
|
KeyVault_Update = 1601;
|
|
|
|
Kubernetes_Create = 1700;
|
|
Kubernetes_Update = 1701;
|
|
|
|
LoadBalancer_Create = 1800;
|
|
LoadBalancer_Update = 1801;
|
|
|
|
Location_Create = 1900;
|
|
Location_Update = 1901;
|
|
|
|
Macpool_Create = 2000;
|
|
Macpool_Update = 2001;
|
|
|
|
NetworkInterface_Create = 2100;
|
|
NetworkInterface_Update = 2101;
|
|
|
|
Node_Create = 2200;
|
|
Node_Update = 2201;
|
|
|
|
Recovery_Create = 2300;
|
|
Recovery_Update = 2301;
|
|
|
|
Role_Create = 2400;
|
|
Role_Update = 2401;
|
|
|
|
RoleAssignment_Create = 2500;
|
|
RoleAssignment_Update = 2501;
|
|
|
|
Secret_Create = 2600;
|
|
Secret_Update = 2601;
|
|
|
|
StorageContainer_Create = 2700;
|
|
StorageContainer_Update = 2701;
|
|
|
|
Subscription_Create = 2800;
|
|
Subscription_Update = 2801;
|
|
|
|
Validation_Validate = 2900;
|
|
|
|
VipPool_Create = 3000;
|
|
VipPool_Update = 3001;
|
|
|
|
VirtualHardDisk_Create = 3100;
|
|
VirtualHardDisk_Update = 3101;
|
|
|
|
VirtualMachineImage_Create = 3200;
|
|
VirtualMachineImage_Update = 3201;
|
|
|
|
VirtualMachineScaleSet_Create = 3300;
|
|
VirtualMachineScaleSet_Update = 3301;
|
|
|
|
VirtualNetwork_Create = 3400;
|
|
VirtualNetwork_Update = 3401;
|
|
|
|
AvailabilitySet_Create = 3500;
|
|
AvailabilitySet_Delete = 3501;
|
|
|
|
NetworkSecurityGroup_Create = 3600;
|
|
NetworkSecurityGroup_Update = 3601;
|
|
|
|
Zone_Create = 3700;
|
|
Zone_Delete = 3701;
|
|
Zone_Update = 3702;
|
|
}
|
|
|
|
extend google.protobuf.FieldOptions {
|
|
bool sensitive = 50001;
|
|
}
|
|
|
|
enum ImageSource {
|
|
LOCAL_SOURCE = 0;
|
|
SFS_SOURCE = 1;
|
|
HTTP_SOURCE = 2;
|
|
CLONE_SOURCE = 3;
|
|
}
|
|
|
|
enum HyperVGeneration {
|
|
HyperVGenerationV2 = 0;
|
|
HyperVGenerationV1 = 1;
|
|
}
|
|
|
|
enum DiskFileFormat {
|
|
DiskFileFormatVHDX = 0;
|
|
DiskFileFormatVHD = 1;
|
|
}
|
|
|
|
enum CloudInitDataSource {
|
|
NoCloud = 0;
|
|
Azure = 1;
|
|
}
|
|
|
|
message ApiVersion {
|
|
uint32 major = 1;
|
|
uint32 minor = 2;
|
|
}
|