Add type field to port bindings table

Part of #504
This commit is contained in:
Girish Ramakrishnan
2018-08-12 22:08:19 -07:00
parent df1dc80fc1
commit 60984d18dd
6 changed files with 48 additions and 24 deletions

View File

@@ -45,6 +45,8 @@ exports = module.exports = {
setOwner: setOwner,
transferOwnership: transferOwnership,
PORT_TYPE_TCP: 'tcp',
// exported for testing
_validateHostname: validateHostname,
_validatePortBindings: validatePortBindings,
@@ -216,7 +218,7 @@ function translatePortBindings(portBindings) {
let result = {};
for (let portName in portBindings) {
result[portName] = { hostPort: portBindings[portName] };
result[portName] = { hostPort: portBindings[portName], type: exports.PORT_TYPE_TCP };
}
return result;
}