Comments (3)
@jkugler I don't believe you are missing anything. This library is a wrapper written around the oc
command and the majority of it was written to provide a rich interaction with OpenShift via the oc
command. Because we support both local and remote executions, it's much easier for us to capture everything into our Result
class, and then pass that back to the consumer to deal with it, as they see fit.
Everything that you are looking for should be available inside of the Result
object returned from whatever Action
that you are performing. While the output may not be streaming real-time, it is available immediately after the action completes and can be written to the screen in multiple ways (action.out
, action.as_dict()
, action.as_json()
). Another nice feature of the action.as_*()
methods is the ability to redact sensitive information from the output.
Hopefully this helps! If you have any questions, please let us know.
from openshift-client-python.
Thanks for the answer! I'm trying to move our team to use the Python API, whether it be this API or https://github.com/openshift/openshift-restclient-python instead of directly shelling out to the oc
command, in order to better handle errors, etc. But, there is a lot of pushback because we then won't have streaming output for the developers so they can watch the progress, abort if there is a hang, etc.
I saw the restclient version had a watch
method on objects, so maybe that will return logs in real time. I need to investigate that.
from openshift-client-python.
No problem, happy to help!
We do provide error tracking as well as a timeout, on oc actions, that sound like it could be something that you could utilize versus the streaming logging. The following link is to a pretty simple example of both of these features:
openshift-client-python/examples/exception_tracking.py
Lines 37 to 47 in 3943e69
from openshift-client-python.
Related Issues (20)
- oc cp: Success but no File
- Creation of a Route onject raise ResourceNotFoundError excpetion when serving.knative.dev/v1 Route api resource is present on the cluster HOT 1
- Allow oc exec into statefulset
- APIObject doesn't respect context namespace HOT 5
- Error error: invalid resource name \"pod/xxxx\": [may not contain '/'] HOT 6
- use selector to find objects without a specific label HOT 1
- Selector#until_all or Selector#until_any methods do not have a timeout HOT 2
- [Question] sharing context with subprocess HOT 2
- [Question] sharing context with subprocess
- Project missing LICENSE file
- Each log has head string and tail string HOT 2
- image mirror HOT 2
- How is this client different from others? HOT 1
- missing positional argumetn in start_build()
- Change/update package namespace HOT 7
- scale function in selector.py has incorrect base_args HOT 1
- Allow custom subclasses of APIObject for Selector.object() and Selector.objects() HOT 3
- How to get project's route/service/configmaps? HOT 2
- oc run HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openshift-client-python.