jumpserver / jumpserver-python-sdk Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
按照例子无法使用,没有UserServices方法啊?
Python版本:2.7.10
安装
pip install jumpserver-python-sdk==0.0.53
然后按照Git上的方法测试
>>> from jms import UserService
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name UserService
试了其他版本也不行,什么情况
Hello,
I was just passing by and discovered these lines:
except (requests.ConnectionError, requests.ConnectTimeout) as e:
msg = "Connect endpoint {} error: {}".format(self.endpoint, e)
logger.error(msg)
raise RequestError(msg)
I just wanted to let you know that you can use from
which allows exception chaining with a customer exception. Essentially allowing you to do this:
class HttpError(Exception):
"""Base class for all HTTP exceptions"""
class EndpointError(Exception):
pass
except (requests.ConnectionError, requests.ConnectTimeout) as e:
raise EndpointError(f"Connect endpoint for {self.endpoint}") from e
And catch it from a higher layer.
要通过api添加资产,id是通过什么算法生成的,有api或者例子吗
jumpserver-python-sdk/jms/utils.py
Line 177 in d58cb31
前面不应该加r
, 参考:
The solution is to use Python’s raw string notation for regular expression patterns; backslashes are not handled in any special way in a string literal prefixed with 'r'. So r"\n" is a two-character string containing '' and 'n', while "\n" is a one-character string containing a newline. Usually patterns will be expressed in Python code using this raw string notation.
RT
文档中的方法,都已经不能用了
应为 heartbeat
请描述您的问题.
项目中同时使用了python-redmine和jumpserver-python-sdk,都使用了requests模块,但jumpserver对requests的版本固定在2.22.0,导致安装时出现依赖冲突。
请问可以麻烦官网升级一下依赖版本吗?
jenkinsapi 0.3.11 depends on requests>=2.3.0
jumpserver-python-sdk 0.0.71 depends on requests==2.22.0
python-gitlab 2.5.0 depends on requests>=2.22.0
python-redmine 2.3.0 depends on requests>=2.23.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
我用web终端连windows资产,进行上传下载的操作时 经常会导致我的Windows重启。有没有大神帮我看看这个问题
管理资产中的IP地址可以不可以添加域名支持,我们有些设备是用PPPoE拨号的,每次断电后地址都不一样,无法纳入JumpServer管理。
如题。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.