-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Most docker commands take an id or a name. e.g. docker logs
Currently (v0.1.2) osxdocker only supports names.
osxdocker/osxdocker/docker_logs.py
Line 41 in 356f9ed
| def clear_log(self, container_name): |
I see two main options:
-
Use one arg and figure out if it's a name or an id.
def clear_logs(container_name_or_id): # this could be complicated / have edgecases. # need to look into constraints for valid names and ids. if(container_name_or_id is name): # do something to convert to id
-
Use 2 kwargs.
Would make cli more verbose, but handle edgecases.
e.g.osxdocker clear_log --name fooinstead ofosxdocker clear_log foo.def getContainerId(id=None, name=None): if (name): # do something to convert to id return id
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request