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

Function validateSlaveInfo

src/master/validation.cpp:309–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307namespace message {
308
309static Option<Error> validateSlaveInfo(const SlaveInfo& slaveInfo)
310{
311 if (slaveInfo.has_id()) {
312 Option<Error> error = common::validation::validateSlaveID(slaveInfo.id());
313 if (error.isSome()) {
314 return error.get();
315 }
316 }
317
318 Option<Error> error = Resources::validate(slaveInfo.resources());
319 if (error.isSome()) {
320 return error.get();
321 }
322
323 return None();
324}
325
326
327Option<Error> registerSlave(const RegisterSlaveMessage& message)

Callers 2

registerSlaveFunction · 0.85
reregisterSlaveFunction · 0.85

Calls 7

NoneClass · 0.85
validateSlaveIDFunction · 0.70
validateFunction · 0.70
idMethod · 0.45
isSomeMethod · 0.45
getMethod · 0.45
resourcesMethod · 0.45

Tested by

no test coverage detected