The function can create one or more Kuberenetes objects
based on the content of data. It can handle all API objects
incuding `List` type, which by itself can contain more than
one Kuberenetes API objects.
Renaming `yml_document` in `create_from_dict` to data. This is a bit
clearer that this it a data item and not a string (usually document
read from the file system).
Also update the documentation to describe better what the functions
`create_from_dict` and `create_from_yaml` do.
All our libraries that depended on `kubernetes` started breaking today.
The reason is that pip does not do a good job properly resolving the compatible package versions.
It just install packages in order without caring about the incompatibilities.
The urllib3 package installed is incompatible with the `requests` package that's getting installed later.
Changing the order fixes the issue.
While this is a really good convention, sometimes one must import
stuff inside a try except block. This block is still at the top, but pycodestyle
treats like it isn't, because it's in an idented block, and the outeer scope.
Using `nginx-app` deployment multiple times, is problematic because we get
conflicts or not found error.
Instead of trying to handle all cases, explicit different names
are used now. The tests now runs more reliably
We create a deployment and do the following:
```
self.assertIsNotNone(dep)
```
Which does not fail, and then the code proceeds to deletion
and fails with a 404 execption in 80% of the time, but sometimes
it works. The deployment is there, but for some reason not available for
deletion.
Travis CI also showed inconsitent behaviour on this. Python3.5 passed
but all other version failed.
With this commit we wait for the deployment to become available for
deletion and only then continue.
This fixes of all tests and keeps the original API.
It's the users responsiblility to do something the execptions
when using `create_from_dict`, no air bag or breaks are supplied here.