{"action":"created","issue":{"url":"https://api.github.com/repos/docker/libnetwork/issues/139","labels_url":"https://api.github.com/repos/docker/libnetwork/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/docker/libnetwork/issues/139/comments","events_url":"https://api.github.com/repos/docker/libnetwork/issues/139/events","html_url":"https://github.com/docker/libnetwork/issues/139","id":74394987,"number":139,"title":"Allow drivers to get the name along with uuid.","user":{"login":"shettyg","id":4305021,"avatar_url":"https://avatars.githubusercontent.com/u/4305021?v=3","gravatar_id":"","url":"https://api.github.com/users/shettyg","html_url":"https://github.com/shettyg","followers_url":"https://api.github.com/users/shettyg/followers","following_url":"https://api.github.com/users/shettyg/following{/other_user}","gists_url":"https://api.github.com/users/shettyg/gists{/gist_id}","starred_url":"https://api.github.com/users/shettyg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shettyg/subscriptions","organizations_url":"https://api.github.com/users/shettyg/orgs","repos_url":"https://api.github.com/users/shettyg/repos","events_url":"https://api.github.com/users/shettyg/events{/privacy}","received_events_url":"https://api.github.com/users/shettyg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-08T15:11:41Z","updated_at":"2015-05-08T16:06:32Z","closed_at":null,"body":"The user passes a \"name\" to libnetwork apis (for e.g., a network name or an endpoint name.). The libnetwork does not pass the same name to the driver but passes a uuid instead. IMO, the \"name\" is an information from the user that should ideally reach the driver. But currently libnetwork blocks it.\r\n\r\nIt would be nice if libnetwork passes this information to the driver too along with the uuid. This way, the driver can keep a relationship between the uuid that libnetwork generates and the name that the user provides.\r\n\r\nUsecases:\r\nThe usecases is for hybrid networks where a docker container and a VM and a physical machine could be reachable to each other. IMO, this provides a good transition path from current workloads to pure-docker workloads. In this case, a network would have to be pre-created outside docker. But we can make docker aware of this network with 'docker network create'.\r\n\r\n1. A pool of endpoints can be pre-created outside docker with names that identify them. When that name is passed to libnetwork api, the driver does not receive it. There is no way for the driver to relate to the uuid that it receives as it is generated by docker. One could argue that the information can be passed with labels. Unfortunately, the \"join\" api does not pass the same label to the driver. So this makes the \"join\" api unusable in such cases and all the functionalities have to remain in driver.CreateEndpoint. \r\n\r\nEven assuming that the driver has to live with this restriction, a 'docker network join' would look unwieldy and confusing looking something like:\r\ndocker network join CONTAINER NETWORK --label ENDPOINT=OS-UUID --label NETWORK=OS-UUID\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/libnetwork/issues/comments/100281952","html_url":"https://github.com/docker/libnetwork/issues/139#issuecomment-100281952","issue_url":"https://api.github.com/repos/docker/libnetwork/issues/139","id":100281952,"user":{"login":"shettyg","id":4305021,"avatar_url":"https://avatars.githubusercontent.com/u/4305021?v=3","gravatar_id":"","url":"https://api.github.com/users/shettyg","html_url":"https://github.com/shettyg","followers_url":"https://api.github.com/users/shettyg/followers","following_url":"https://api.github.com/users/shettyg/following{/other_user}","gists_url":"https://api.github.com/users/shettyg/gists{/gist_id}","starred_url":"https://api.github.com/users/shettyg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shettyg/subscriptions","organizations_url":"https://api.github.com/users/shettyg/orgs","repos_url":"https://api.github.com/users/shettyg/repos","events_url":"https://api.github.com/users/shettyg/events{/privacy}","received_events_url":"https://api.github.com/users/shettyg/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T16:06:31Z","updated_at":"2015-05-08T16:06:31Z","body":"@mapuri\r\nYes. A 'network-create' does have the ability to receive labels. But a driver.Join() does not receive the labels provided when you call \"docker network join\". (Please see: https://github.com/docker/libnetwork/issues/133 for more details). It instead receives the labels that you provide with 'docker create container'\r\n\r\nIrrespective of the resolution to the driver.Join() issue, I do not see a need to supply the name twice to the command line when that information is already available with libnetwork."}}