github.com/microsoft/moc@v0.17.1/rpc/common/moc_common_common.proto (about)

     1  // Copyright (c) Microsoft Corporation.
     2  // Licensed under the Apache v2.0 license.
     3  
     4  syntax = "proto3";
     5  option go_package = "github.com/microsoft/moc/rpc/common";
     6  
     7  package moc;
     8  import "google/protobuf/descriptor.proto";
     9  
    10  enum Operation {
    11  	GET = 0;
    12  	POST = 1;
    13  	DELETE = 2;
    14  	UPDATE = 3;
    15  	IMPORT = 4;
    16  	EXPORT = 5;
    17  	VALIDATE = 6;
    18  }
    19  
    20  enum ProvisionState {
    21  	UNKNOWN = 0;
    22  	CREATING = 1;
    23  	CREATED = 2;
    24  	CREATE_FAILED = 3;
    25  	DELETING = 4;
    26  	DELETE_FAILED = 5;
    27  	DELETED = 6;
    28  	UPDATING = 7;
    29  	UPDATE_FAILED = 8;
    30  	UPDATED = 9;
    31  	PROVISIONING = 10;
    32  	PROVISIONED = 11;
    33  	PROVISION_FAILED = 12;
    34  	DEPROVISIONING = 13;
    35  	DEPROVISIONED = 14;
    36  	DEPROVISION_FAILED = 15;
    37  	DELETE_PENDING = 16;
    38  	IMPORTING = 17;
    39  	IMPORTED = 18;
    40  	IMPORT_FAILED = 19;
    41  }
    42  
    43  enum HighAvailabilityState {
    44  	UNKNOWN_HA_STATE = 0;
    45  	STABLE = 1;
    46  	PENDING = 2;
    47  }
    48  
    49  enum HealthState {
    50  	NOTKNOWN = 0;
    51  	OK = 1;
    52  	WARNING = 2;
    53  	CRITICAL = 3;
    54  	// The entity went missing from the platform
    55  	MISSING = 4;
    56  	DEGRADED = 5;
    57  	// The entity went missing from the agent
    58  	NOTFOUND = 6;
    59  }
    60  
    61  message Error {
    62  	string Message = 1;
    63  	int32 Code = 2;
    64  	string Parameters = 3;
    65  }
    66  
    67  message ProvisionStatus {
    68  	ProvisionState currentState = 1;
    69  	ProvisionState previousState = 2;
    70  }
    71  
    72  message DownloadStatus {
    73  	int64 progressPercentage = 1;
    74  	int64 downloadSizeInBytes = 2;
    75  	int64 fileSizeInBytes = 3;
    76  }
    77  
    78  message Health {
    79  	HealthState currentState = 1;
    80  	HealthState previousState = 2;
    81  }
    82  
    83  enum ValidationStateCode {
    84  	NODE_UNREACHABLE = 0;
    85  	ENTITY_MISSING = 1;
    86  	CLIENT_CREATION_FAILURE = 2;
    87  	FORMAT_INVALID = 3;
    88  	INFO_MISSING = 4;
    89  	INFO_MISMATCH = 5;
    90  }
    91  
    92  message ValidationState {
    93  	ValidationStateCode code = 1;
    94  	string message = 2;
    95  	string recommendation = 3;
    96  }
    97  
    98  message ValidationStatus {
    99  	repeated ValidationState validationState = 1;
   100  }
   101  
   102  message Version {
   103  	string number = 1;
   104  }
   105  
   106  message Status {
   107  	Health health = 1;
   108  	ProvisionStatus provisioningStatus = 2;
   109  	Error lastError = 3;
   110  	Version version = 4;
   111  	DownloadStatus downloadStatus = 5;
   112  	ValidationStatus validationStatus = 6;
   113  }
   114  
   115  message Entity {
   116  	bool IsPlaceholder = 1; // On a multi-node system, the entity (such as a VM) is created on a node where 
   117  							// IsPlacehoder is false. On all the other nodes, IsPlaceholder is set to true.
   118  							// When an entity moves among these nodes (such as when a VM migrates), the 
   119  							// IsPlacehoder property is updated accordingly on all the nodes.
   120  							// IsPlacehoder therefore defines where the entity (VM) is *not* located.
   121  							// This property is the exact inverse of the node agent's SystemOwned property.
   122  }
   123  
   124  message Tag {
   125  	string key = 1;
   126  	string value = 2;
   127  }
   128  
   129  message Tags {
   130  	repeated Tag tags = 1;
   131  }
   132  
   133  enum ClientType {
   134  	CONTROLPLANE = 0;
   135  	EXTERNALCLIENT = 1;
   136  	NODE = 2;
   137  	ADMIN = 3;
   138  	BAREMETAL = 4;
   139  	LOADBALANCER = 5;
   140  	HOST = 6;
   141  }
   142  
   143  enum AuthenticationType {
   144  	SELFSIGNED = 0;
   145  	CASIGNED = 1;
   146  }
   147  
   148  enum ProviderType {
   149  	AnyProvider            = 0;
   150  	VirtualMachine         = 1;
   151  	VirtualMachineScaleSet = 2;
   152  	LoadBalancer           = 3;
   153  	VirtualNetwork         = 4;
   154  	VirtualHardDisk        = 5;
   155  	GalleryImage           = 6;
   156  	VirtualMachineImage    = 7;
   157  	NetworkInterface       = 8;
   158  	Certificate            = 9;
   159  	Key                    = 10;
   160  	Secret                 = 11;
   161  	KeyVault               = 12;
   162  	Identity               = 13;
   163  	Role                   = 14;
   164  	RoleAssignment         = 15;
   165  	Kubernetes             = 16;
   166  	Cluster                = 17;
   167  	ControlPlane           = 18;
   168  	Group                  = 19;
   169  	Node                   = 20;
   170  	Location               = 21;
   171  	StorageContainer       = 22;
   172  	StorageFile            = 23;
   173  	StorageDirectory       = 24;
   174  	Subscription           = 25;
   175  	VipPool                = 26;
   176  	MacPool                = 27;
   177  	EtcdCluster            = 28;
   178  	EtcdServer             = 29;
   179  	BareMetalMachine       = 30;
   180  	CredentialMonitor      = 31;
   181  	Logging                = 32;
   182  	Recovery               = 33;
   183  	Debug                  = 34;
   184  	BareMetalHost          = 35;
   185  	Authentication         = 36;
   186  	HealthMonitor          = 37;
   187  	LogicalNetwork         = 38;
   188  	AvailabilitySet		   = 39;
   189  	NetworkSecurityGroup   = 40;
   190  }
   191  
   192  // Operations specific to a provider
   193  // Format is [Provider]_[Operation]
   194  enum ProviderAccessOperation {
   195  	Unspecified 					= 0;
   196  
   197  	Authentication_Login 			= 100;
   198  
   199  	Certificate_Create		 		= 200; 
   200  	Certificate_Update				= 201;
   201  	Certificate_Get 				= 202; 
   202  	Certificate_Delete 				= 203; 
   203  	Certificate_Sign 				= 204; 
   204  	Certificate_Renew 				= 205; 
   205  
   206  	Identity_Create					= 300; 
   207  	Identity_Update					= 301; 
   208  	Identity_Revoke 				= 302; 
   209  	Identity_Rotate 				= 303;  
   210  
   211  	IdentityCertificate_Create		= 400; 
   212  	IdentityCertificate_Update		= 401; 
   213  	IdentityCertificate_Renew 		= 402;
   214  
   215  	Key_Create						= 500; 
   216  	Key_Update						= 501; 
   217  	Key_Encrypt 					= 502; 
   218  	Key_Decrypt 					= 503; 
   219  	Key_WrapKey 					= 504; 
   220  	Key_UnwrapKey					= 505; 
   221  	Key_Sign 						= 506; 
   222  	Key_Verify 						= 507; 
   223  
   224  	VirtualMachine_Create 				= 600; 
   225  	VirtualMachine_Update 				= 601; 
   226  	VirtualMachine_Delete				= 602; 
   227  	VirtualMachine_Validate				= 603; 
   228  	VirtualMachine_Start 				= 604;
   229  	VirtualMachine_Stop 				= 605;
   230  	VirtualMachine_Reset 				= 606;
   231  	VirtualMachine_Repair_Guest_Agent		= 607;
   232  	VirtualMachine_Pause 				= 608;
   233  	VirtualMachine_Save 				= 609;
   234  
   235  	Cluster_Create					= 700; 
   236  	Cluster_Update 					= 701; 
   237  	Cluster_LoadCluster 			= 702; 
   238  	Cluster_UnloadCluster 			= 703; 
   239  	Cluster_GetCluster 				= 704; 
   240  	Cluster_GetNodes 				= 705; 
   241  
   242  	Debug_DebugServer				= 800; 
   243  	Debug_StackTrace				= 801;
   244  
   245  	BaremetalHost_Create            = 900;
   246  	BaremetalHost_Update            = 901;
   247  
   248  	BaremetalMachine_Create         = 1000;
   249  	BaremetalMachine_Update         = 1001;
   250  
   251  	ControlPlane_Create             = 1100;
   252  	ControlPlane_Update             = 1101;
   253  
   254  	EtcdCluster_Create              = 1200;
   255  	EtcdCluster_Update              = 1201;
   256  
   257  	EtcdServer_Create               = 1300;
   258  	EtcdServer_Update               = 1301;
   259  
   260  	GalleryImage_Create             = 1400;
   261  	GalleryImage_Update             = 1401;
   262  
   263  	Group_Create            		= 1500;
   264  	Group_Update            		= 1501;
   265  
   266  	KeyVault_Create         		= 1600;
   267  	KeyVault_Update         		= 1601;
   268  
   269  	Kubernetes_Create               = 1700;
   270  	Kubernetes_Update               = 1701;
   271  
   272  	LoadBalancer_Create             = 1800;
   273  	LoadBalancer_Update             = 1801;
   274  
   275  	Location_Create         		= 1900;
   276  	Location_Update         		= 1901;
   277  
   278  	Macpool_Create          		= 2000;
   279  	Macpool_Update          		= 2001;
   280  
   281  	NetworkInterface_Create         = 2100;
   282  	NetworkInterface_Update         = 2101;
   283  
   284  	Node_Create             		= 2200;
   285  	Node_Update             		= 2201;
   286  
   287  	Recovery_Create         		= 2300;
   288  	Recovery_Update         		= 2301;
   289  
   290  	Role_Create             		= 2400;
   291  	Role_Update             		= 2401;
   292  
   293  	RoleAssignment_Create           = 2500;
   294  	RoleAssignment_Update           = 2501;
   295  
   296  	Secret_Create           		= 2600;
   297  	Secret_Update           		= 2601;
   298  
   299  	StorageContainer_Create         = 2700;
   300  	StorageContainer_Update         = 2701;
   301  
   302  	Subscription_Create             = 2800;
   303  	Subscription_Update             = 2801;
   304  
   305  	Validation_Validate             = 2900;
   306  
   307  	VipPool_Create          		= 3000;
   308  	VipPool_Update          		= 3001;
   309  
   310  	VirtualHardDisk_Create          = 3100;
   311  	VirtualHardDisk_Update          = 3101;
   312  
   313  	VirtualMachineImage_Create      = 3200;
   314  	VirtualMachineImage_Update      = 3201;
   315  
   316  	VirtualMachineScaleSet_Create   = 3300;
   317  	VirtualMachineScaleSet_Update   = 3301;
   318  
   319  	VirtualNetwork_Create           = 3400;
   320  	VirtualNetwork_Update           = 3401;
   321  
   322  	AvailabilitySet_Create		    = 3500;
   323  	AvailabilitySet_Delete		    = 3501;
   324  
   325  	NetworkSecurityGroup_Create 	= 3600;
   326  	NetworkSecurityGroup_Update 	= 3601;
   327  }
   328  
   329  extend google.protobuf.FieldOptions {
   330  	bool sensitive = 50001;
   331  }
   332  
   333  enum ImageSource {
   334          LOCAL_SOURCE = 0;
   335          SFS_SOURCE   = 1;
   336          HTTP_SOURCE  = 2;
   337          CLONE_SOURCE = 3;
   338  }
   339  
   340  enum HyperVGeneration {
   341  	HyperVGenerationV2 = 0;
   342  	HyperVGenerationV1 = 1;
   343  } 
   344  
   345  enum DiskFileFormat {
   346  	DiskFileFormatVHDX =  0;
   347  	DiskFileFormatVHD = 1;
   348  } 
   349  
   350  enum CloudInitDataSource {
   351  	NoCloud = 0;
   352  	Azure = 1;
   353  }