sharedprotos/system/system.proto (316 lines of code) (raw):

/* Copyright 2022 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ syntax = "proto3"; package workloadagentplatform.sharedprotoss.system; import "google/protobuf/timestamp.proto"; option go_package = "github.com/GoogleCloudPlatform/workloadagentplatform/sharedprotos/system"; // The schema of SAP system discovery data. message SapDiscovery { // The metadata for SAP system discovery data. Metadata metadata = 1; // An SAP System must have a database. Component database_layer = 2; // An SAP system may run without an application layer. Component application_layer = 3; // A combination of database SID, database instance URI and tenant DB name // to make a unique identifier per-system. string system_id = 4; // Unix timestamp this system has been updated last. google.protobuf.Timestamp update_time = 5; // The GCP project number that this SapSystem belongs to. string project_number = 6; // The properties of the workload. WorkloadProperties workload_properties = 7; // Message describing SAP discovery system metadata message Metadata { // Customer defined, something like "E-commerce pre prod" string defined_system = 1; // This sap product name string sap_product = 2; // Should be "prod", "QA", "dev", "staging", etc. string environment_type = 3; // Customer region string for customer's use. Does not represent GCP region. string customer_region = 4; } // Message describing a resource. message Resource { // Different types of resources attached to the SAP system. enum ResourceType { // Undefined resource type. RESOURCE_TYPE_UNSPECIFIED = 0; // This is a compute resource. RESOURCE_TYPE_COMPUTE = 1; // This a storage resource. RESOURCE_TYPE_STORAGE = 2; // This is a network resource. RESOURCE_TYPE_NETWORK = 3; } // The type of this resource. ResourceType resource_type = 1; // Different kinds of resources in the SAP System. enum ResourceKind { // Unspecified resource kind. RESOURCE_KIND_UNSPECIFIED = 0; // This is a compute instance. RESOURCE_KIND_INSTANCE = 1; // This is a compute disk. RESOURCE_KIND_DISK = 2; // This is a compute address. RESOURCE_KIND_ADDRESS = 3; // This is a filestore instance. RESOURCE_KIND_FILESTORE = 4; // This is a compute health check. RESOURCE_KIND_HEALTH_CHECK = 5; // This is a compute forwarding rule. RESOURCE_KIND_FORWARDING_RULE = 6; // This is a compute backend service. RESOURCE_KIND_BACKEND_SERVICE = 7; // This is a compute subnetwork. RESOURCE_KIND_SUBNETWORK = 8; // This is a compute network. RESOURCE_KIND_NETWORK = 9; // This is a public accessible IP Address. RESOURCE_KIND_PUBLIC_ADDRESS = 10; // This is a compute instance group. RESOURCE_KIND_INSTANCE_GROUP = 11; } // ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc. ResourceKind resource_kind = 2; // URI of the resource, includes project, location, and name. string resource_uri = 3; // A list of resource URIs related to this resource. repeated string related_resources = 4; // Unix timestamp of when this resource last had its discovery data updated. google.protobuf.Timestamp update_time = 5; // A set of properties only present for an instance type resource message InstanceProperties { // A virtual hostname of the instance if it has one. string virtual_hostname = 1; // A list of instance URIs that are part of a cluster with this one. repeated string cluster_instances = 2; // The VM's instance number. uint64 instance_number = 3; // Bitmask of instance roles. enum InstanceRole { // Unspecified instance role. INSTANCE_ROLE_UNSPECIFIED = 0; // Application central services. INSTANCE_ROLE_ASCS = 1; // Enqueue replication server. INSTANCE_ROLE_ERS = 2; // Application server. INSTANCE_ROLE_APP_SERVER = 4; // Database node. INSTANCE_ROLE_DATABASE = 8; // Combinations of roles. // Application central services and enqueue replication server. INSTANCE_ROLE_ASCS_ERS = 3; // Application central services and application server. INSTANCE_ROLE_ASCS_APP_SERVER = 5; // Application central services and database. INSTANCE_ROLE_ASCS_DATABASE = 9; // Enqueue replication server and application server. INSTANCE_ROLE_ERS_APP_SERVER = 6; // Enqueue replication server and database. INSTANCE_ROLE_ERS_DATABASE = 10; // Application server and database. INSTANCE_ROLE_APP_SERVER_DATABASE = 12; // Application central services, enqueue replication server and // application server. INSTANCE_ROLE_ASCS_ERS_APP_SERVER = 7; // Application central services, enqueue replication server and // database. INSTANCE_ROLE_ASCS_ERS_DATABASE = 11; // Application central services, application server and database. INSTANCE_ROLE_ASCS_APP_SERVER_DATABASE = 13; // Enqueue replication server, application server and database. INSTANCE_ROLE_ERS_APP_SERVER_DATABASE = 14; // Application central services, enqueue replication server, // application server and database. INSTANCE_ROLE_ASCS_ERS_APP_SERVER_DATABASE = 15; } // Bitmask of instance role, a resource may have multiple roles at once. InstanceRole instance_role = 4; // Fields to describe an SAP application server instance. message AppInstance { // Instance name of the SAP application instance. string name = 1; // Instance number of the SAP application instance. string number = 2; } // App server instances on the host repeated AppInstance app_instances = 5; // Instance is part of a DR site. bool is_dr_site = 6; // Disk mount on the instance. message DiskMount { // Name of the disk. string name = 1; // Filesystem mount point. string mount_point = 2; // Names of the disks providing this mount point. repeated string disk_names = 3; } // Disk mounts on the instance. repeated DiskMount disk_mounts = 7; // Disk device name on the instance. // This message is only used in local discovery. message DiskDeviceName { // Source of the disk. string source = 1; // Device name of the disk. string device_name = 2; } // Disk device names on the instance. // This field is only used in local discovery, and should be removed // before sending to DW. repeated DiskDeviceName disk_device_names = 8; } // A set of properties only applying to instance type resources. InstanceProperties instance_properties = 6; } // Message describing the system component. message Component { // The resources in a component. repeated Resource resources = 1; // A set of properties describing an SAP Application layer. message ApplicationProperties { // The type of application running in the system. enum ApplicationType { // Unspecified application type APPLICATION_TYPE_UNSPECIFIED = 0; // SAP Netweaver NETWEAVER = 1; // SAP Netweaver ABAP NETWEAVER_ABAP = 2; // SAP Netweaver Java NETWEAVER_JAVA = 3; } // Type of the application. Netweaver, etc. ApplicationType application_type = 1; // Resource URI of the recognized ASCS host of the application. string ascs_uri = 2; // Resource URI of the recognized shared NFS of the application. // May be empty if the application server has only a single node. string nfs_uri = 3; // Kernel version for Netweaver running in the system. string kernel_version = 4; // Deprecated: ApplicationType now tells you whether this is ABAP or Java. bool abap = 5 [deprecated = true]; // Instance number of the SAP application instance. string instance_number = 6 [deprecated = true]; // Instance number of the ASCS instance. string ascs_instance_number = 7; // Instance number of the ERS instance. string ers_instance_number = 8; } // A set of properties describing an SAP Database layer. message DatabaseProperties { // The type of Database running in the system. enum DatabaseType { // Unspecified database type. DATABASE_TYPE_UNSPECIFIED = 0; // SAP HANA HANA = 1; // SAP MaxDB MAXDB = 2; // IBM DB2 DB2 = 3; // Oracle Database ORACLE = 4; // Microsoft SQL Server SQLSERVER = 5; // SAP Sybase ASE ASE = 6; } // Type of the database. HANA, DB2, etc. DatabaseType database_type = 1; // URI of the recognized primary instance of the database. string primary_instance_uri = 2; // URI of the recognized shared NFS of the database. // May be empty if the database has only a single node. string shared_nfs_uri = 3; // The version of the database software running in the system. string database_version = 4; // Instance number of the SAP instance. string instance_number = 5; // SID of the system database. string database_sid = 6; // Landscape ID from the HANA nameserver. string landscape_id = 7; } oneof properties { // The component is a SAP application. ApplicationProperties application_properties = 2; // The component is a SAP database. DatabaseProperties database_properties = 3; } // Pantheon Project in which the resources reside. string host_project = 4; // The sap identifier, // used by the SAP software and helps differentiate systems for customers. string sid = 5; // Different types of system topology. enum TopologyType { // Unspecified topology. TOPOLOGY_TYPE_UNSPECIFIED = 0; // A scale-up single node system. TOPOLOGY_SCALE_UP = 1; // A scale-out multi-node system. TOPOLOGY_SCALE_OUT = 2; } // The detected topology of the component. TopologyType topology_type = 6; // A list of host URIs that are part of the HA configuration if present. // An empty list indicates the component is not configured for HA. repeated string ha_hosts = 7; // A replication site used in Disaster Recovery (DR) configurations. message ReplicationSite { // The name of the source site from which this one replicates. string source_site = 1; // The system component for the site. Component component = 2; } // A list of replication sites used in Disaster Recovery (DR) // configurations. repeated ReplicationSite replication_sites = 8; // The region this component's resources are primarily located in. string region = 9; } // A set of properties describing an SAP workload. message WorkloadProperties { // A product name and version. message ProductVersion { string name = 1; string version = 2; } // List of SAP Products and their versions running on the system. repeated ProductVersion product_versions = 1; // A SAP software component name, version, and type. message SoftwareComponentProperties { // Name of the component. string name = 1; // The component's major version. string version = 2; // The component's minor version. string ext_version = 3; // The component's type. string type = 4; } // A list of SAP software components and their versions running on the // system. repeated SoftwareComponentProperties software_component_versions = 2; } // Whether to use DR reconciliation or not. bool use_dr_reconciliation = 8; }