Skip to content

Commit f0d9519

Browse files
committed
Remove references to generated code
(cherry picked from commit 7484bd4)
1 parent 52a3cce commit f0d9519

File tree

1 file changed

+0
-113
lines changed

1 file changed

+0
-113
lines changed

README.md

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -442,119 +442,6 @@ for event in v1_services.watch(namespace='test'):
442442
print(event['object'])
443443
```
444444

445-
# DEPRECATED Generated client usage
446-
447-
To work with a K8s object, use the K8s client, and to work with an OpenShift specific object, use the OpenShift client. For example, the following uses the K8s client to create a new Service object:
448-
449-
```python
450-
import yaml
451-
from kubernetes import client, config
452-
453-
config.load_kube_config()
454-
api = client.CoreV1Api()
455-
456-
service = """
457-
kind: Service
458-
apiVersion: v1
459-
metadata:
460-
name: my-service
461-
spec:
462-
selector:
463-
app: MyApp
464-
ports:
465-
- protocol: TCP
466-
port: 8080
467-
targetPort: 9376
468-
"""
469-
470-
service_data = yaml.load(service)
471-
resp = api.create_namespaced_service(body=service_data, namespace='default')
472-
473-
# resp is a V1Service object
474-
print resp.metadata.self_link
475-
```
476-
477-
Now in the following example, we use the OpenShift client to create a Route object, and associate it with the new Service:
478-
479-
```python
480-
import yaml
481-
from openshift import client, config
482-
483-
config.load_kube_config()
484-
api = client.OapiApi()
485-
486-
route = """
487-
apiVersion: v1
488-
kind: Route
489-
metadata:
490-
name: frontend
491-
spec:
492-
host: www.example.com
493-
to:
494-
kind: Service
495-
name: my-service
496-
"""
497-
498-
route_data = yaml.load(route)
499-
resp = api.create_namespaced_route(body=route_data, namespace='default')
500-
501-
# resp is a V1Route object
502-
print resp.metadata.self_link
503-
```
504-
505-
And finally, the following uses the OpenShift client to list Projects the user can access:
506-
507-
```python
508-
from openshift import client, config
509-
510-
config.load_kube_config()
511-
oapi = client.OapiApi()
512-
513-
project_list = oapi.list_project()
514-
for project in project_list.items:
515-
print project.metadata.name
516-
```
517-
518-
# DEPRECATED Documentation
519-
520-
All OpenShift API and Model documentation can be found in the [Generated client's README file](openshift/README.md)
521-
522-
## DEPRECATED Update generated client
523-
524-
Updating the generated client requires the following tools:
525-
526-
- tox
527-
- docker
528-
529-
To apply the updates:
530-
531-
1) Incorporate new changes to update scripts
532-
- [scripts/constants.py](./scripts/constants.py), [scripts/pom.xml](./scripts/pom.xml), [scripts/preprocess_spec.py](./scripts/preprocess_spec.py), and [update-client.sh](./update-client.sh) are the most important
533-
2) Run tox -e update_client
534-
535-
## Compatibility
536-
537-
We are downstream of the [kubernetes python client](github.com/kubernetes-client/python). We maintain compatibility for API version `n-2` - so if you are connecting to a version 3.6 OpenShift cluster, the list of supported python client versions would be `[0.3.x, 0.4.x, 0.5.x]`.
538-
539-
### Compatibility matrix
540-
541-
| openshift python | kubernetes python | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 | Kubernetes 1.9 |
542-
|------------------|-------------------|----------------|----------------|----------------|----------------|----------------|
543-
| openshift 0.3 | kubernetes 3.0 | + | + || - | - |
544-
| openshift 0.4 | kubernetes 4.0 | +* | + | + || - |
545-
| openshift 0.5 | kubernetes 5.0 | +* | +* | + | + ||
546-
| openshift HEAD | kubernetes HEAD | +* | +* | + | + ||
547-
548-
Key:
549-
550-
* `` Exactly the same features / API objects in both openshift-restclient-python and the OpenShift
551-
version.
552-
* `+` openshift-restclient-python has features or api objects that may not be present in the
553-
OpenShift cluster, but everything they have in common will work.
554-
* `-` The OpenShift cluster has features the openshift-restclient-python library can't use
555-
(additional API objects, etc).
556-
* `*` This client/server combination may work, but is not officially supported.
557-
558445
# Community, Support, Discussion
559446

560447
If you have any problem with the package or any suggestions, please file an [issue](https://github.com/openshift/openshift-restclient-python/issues).

0 commit comments

Comments
 (0)