saltstack/salt — pull request #18601 by krak3n (2014-12-01 15:59:23+00:00)
Title: Docker pulled - compare against images correctly

Hi Guys

When running a `docker.pulled` with force against an image tag the state can often return changes even though no changes occurred.

### Example

``` yaml
foo:
docker.pulled:
- tag: bar
- force: true
```

This will force salt to check for a new version of the `foo` image at tag `bar`. However because the `dockerio.pulled` method runs `__salt__['docker.inspect_image']('foo')` the comparison of image ID's would be `None` vs `3ac61da661ee...` which would result in the changes dict being populated which is not correct.

This pull request ensures that if a tag is provided the call to `inspect_image` would be `foo:bar` ensuring we compare the correct existing image with the remote image.

I think that explains it lol