blob: 224da71e9f34d2ea11a6e6e235d0f8196abaeb90 [file] [log] [blame]
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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
*
* http://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.
*/
import "mesos/mesos.proto";
package mesos.master;
/**
* Describes a role, which is used to group frameworks for allocation
* decisions, depending on the allocation policy being used.
* The weight field can be used to indicate forms of priority.
*/
message RoleInfo {
required string name = 1;
optional double weight = 2 [default = 1];
}
/**
* Describes the status of an inverse offer.
*
* This is a protobuf so as to be able to share the status to inverse offers
* through endpoints such as the maintenance status endpoint.
*/
// TODO(jmlvanre): Copy this when V1 Allocator API is introduced.
message InverseOfferStatus {
enum Status {
// We have not received a response yet. This is the default state before
// receiving a response.
UNKNOWN = 1;
// The framework is ok with the inverse offer. This means it will not
// violate any SLAs and will attempt to evacuate any tasks running on the
// agent. If the tasks are not evacuated by the framework, the operator can
// manually shut down the slave knowing that the framework will not have
// violated its SLAs.
ACCEPT = 2;
// The framework wants to block the maintenance operation from happening. An
// example would be that it can not meet its SLA by losing resources.
DECLINE = 3;
}
required Status status = 1;
required FrameworkID framework_id = 2;
// Time, since the epoch, when this status was last updated.
required TimeInfo timestamp = 3;
// TODO(jmlvanre): Capture decline message.
}