Comments (8)
On 19 Jul 2016, at 10:48, abonas wrote:
I understand when it can happen code wise if you initialize the "base"
client - and indeed the above example would solve it. But iiic users
can also initialize directly the subclients, and then how would that
be handled for operations if URI is passed?
Yes, for a direct call into the subclient, it would also need a .to_s
in its uri = URI.parse ep
line. Usually except for metrics-only
operation
of CM, people don't call the sub-clients without the parent.
We should make that more explicit / prominent though.
Also the above code subs
https
forws
, but you wrote that SSL is
not allowed, that part confuses me 😕
the https?
regex allows for both http
and https
- I think that is
ok.
We catch both and then use a ws:uri
.
from hawkular-client-ruby.
can you be a bit more specific what is the problem? the title is quite vague, I am kind of guessing what is not working :)
another gsub in addition to what? does not work in which way?
from hawkular-client-ruby.
regardless, do you know why gsub
is used and not sub
? (the latter is faster, it replaces the first occurence of the needed substring only, which in this case of protocol is reasonable)
from hawkular-client-ruby.
I think this issue is the same we had on URL normalization method #107 when we assume the entry point is a string, but it can be a URI object also.
Is this the same case? @pilhuhn
from hawkular-client-ruby.
On 18 Jul 2016, at 18:47, Ruben Vargas wrote:
I think this issue is the same we had on URL normalization method[1]
when we assume the entry point is a string, but it can be a URI object
also.Is this the same case? @pilhuhn
Yes
from hawkular-client-ruby.
lets say we've received here a URI. I am not sure whether uri object works at all with ws.
meaning - the user was able to actually create a uri object intended for operation with websockets?
from hawkular-client-ruby.
This happens when you go
uri = URI.parse('http://..')
hash = { entrypoint: uri, ... }
client=Hawkular::Client.new(hash)
ops = client.operations
I think it is enough to modify
Operations::OperationsClient.new(entrypoint: @state[:entrypoint].gsub(/^https?/, 'ws'),
to
Operations::OperationsClient.new(entrypoint: @state[:entrypoint].to_s.sub(/^https?/, 'ws'),
We need to revisit the whole WS handling once we allow for SSL, which we don't do yet (then the operations client also needs more code internally iirc).
from hawkular-client-ruby.
I understand when it can happen code wise if you initialize the "base" client - and indeed the above example would solve it. But iiic users can also initialize directly the subclients, and then how would that be handled for operations/ws if URI is passed? (my point is that if operations client works only with websockets, supporting accepting an URI object here if it can't represent ws is incorrect in the first place. clearly it can be solved in code)
Also the above code subs https
for ws
, but you wrote that SSL is not allowed, that part confuses me 😕
from hawkular-client-ruby.
Related Issues (20)
- Return a more complete operation definition from inventory
- List operations sometimes fails
- get operation parameters via the official inventory way
- Add support for rates on query_stats mapping
- Support string metrics
- Allow to list tags in hawkular-metrics HOT 1
- ackBy no longer exists on alerts HOT 1
- Tenant handing in h-metrics 0.20 has changed
- Remove specs context metrics_0_16_ and leave only metric_services and metrics_0_8_0
- Add Test cases for XA Datasource to Datasource Add
- Add 'interval' field of alert conditions
- Add an option to query metrics based on tag only (regardless to type) HOT 2
- Support for multi-tenant operations HOT 6
- @inv_client.create_resource does not return path when resource already exists
- Add support for activesupport gem? HOT 12
- Consider replacing the websocket-client-simple gem with the same gem that is being used in the MiQ HOT 1
- Consider dropping support for v0.8 metrics HOT 5
- hawkular-website-bot's gh token lost the rights to push to the repo
- Incompatible with rest-client 2.1.0.rc1 ? 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 hawkular-client-ruby.