MCPcopy Create free account
hub / github.com/apache/mesos / createOperation

Function createOperation

src/common/protobuf_utils.cpp:544–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542
543
544Operation createOperation(
545 const Offer::Operation& info,
546 const OperationStatus& latestStatus,
547 const Option<FrameworkID>& frameworkId,
548 const Option<SlaveID>& slaveId,
549 const Option<UUID>& operationUUID)
550{
551 Operation operation;
552 if (frameworkId.isSome()) {
553 operation.mutable_framework_id()->CopyFrom(frameworkId.get());
554 }
555 if (slaveId.isSome()) {
556 operation.mutable_slave_id()->CopyFrom(slaveId.get());
557 }
558 operation.mutable_info()->CopyFrom(info);
559 operation.mutable_latest_status()->CopyFrom(latestStatus);
560 if (operationUUID.isSome()) {
561 operation.mutable_uuid()->CopyFrom(operationUUID.get());
562 } else {
563 operation.mutable_uuid()->CopyFrom(protobuf::createUUID());
564 }
565
566 return operation;
567}
568
569
570UpdateOperationStatusMessage createUpdateOperationStatusMessage(

Callers 4

applyOperationMethod · 0.85
dropOperationMethod · 0.85
applyOperationMethod · 0.85
_applyMethod · 0.85

Calls 4

createUUIDFunction · 0.85
CopyFromMethod · 0.80
isSomeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected