I am looking for an endpoint in Azure IotHub to download the full configuration of an edge device.
{
"modulesContent": {
"$edgeAgent": {
"properties.desired": {
"modules": {...
"runtime": {...
"schemaVersion": "1.0",
"systemModules": {
"edgeAgent": {...
"edgeHub": {...
}
},
"$edgeHub": {
"properties.desired": {...
}
}
}
There is an endpoint to apply the configuration, but I just cannot find a way to access the configuration with code :-)
Can someone point me to the right direction?
Thanks
One option to query the local configuration is:
az iot hub module-twin show -n <name-of-your-hub> -d <edge-device-name> -m '$edgeAgent'
If you want to query a current status you can add --query 'properties.reported.modules'
In addition when you have the module ids you can query the module twin as well using:
az iot hub module-twin show --hub-name <name-of-your-hub> --device-id <edge-device-name> --module-id <module-name>
Hopefully it answers your question
Related
I'm trying to create a private bitcoin network using bitcore. But bitcore sync's data either with bitcoin livenet or testnet. I couldn;t find any bitcore documentation which will allow me to create a network from scratch.
I followed the instruction from below link
https://bitcore.io/guides/full-node
{
"network": "livenet" or "testnet" || what do i have to put for private network?
"port": 3001,
"https": true
}
I think you need to add your custom info in the bitcore-node.json which is created in your node directory
{
"network": "livenet", // your coins network name
"port": 3001, // your coins port
"services": [
"bitcoind", // required services
"web"
],
"servicesConfig": {
"bitcoind": {
"datadir": "/home/user/.bitcoin", //your coins directory
"exec": "/home/user/bitcoin/src/bitcoind" //your coins executable
}
}
}
So changing
"network": "livenet"
to whatever yours is called should do the job. Now you should be able to run your custom node with a different network.
I am currently installing with WSO2 EMM
I managed to set it correctly for my domain name.
I managed to put several tablets and smartphones under Android in the management console EMM.
https://i.stack.imgur.com/0Wlq0.png
In the emm-analytics-dashboard console, I do not see any devices
https://i.stack.imgur.com/MZiU4.png
I'm use the WSO2 2.1.1 version
Can you help me please.
Sorry for my english because i'm french... I use Google Translator
Thank for your reply.
You need to setup authorization configuration in portal/configs/designer.json
"authorization": {
"activeMethod": "oauth",
"methods": {
"oauth": {
"attributes": {
"idPServer": "https://localhost:9443/oauth2/token", (or https://<your_ip>:9443/oauth2/token)
"dynamicClientProperties": {
"callbackUrl": "https://localhost:9443/portal", (or https://<your_ip>:9443/portal)
"clientName": "portal",
"owner": "admin",
"applicationType": "JaggeryApp",
"grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer",
"saasApp": false,
"dynamicClientRegistrationEndPoint": "https://localhost:9443/dynamic-client-web/register/", (or https://<your_ip>:9443/dynamic-client-web/register/)
"tokenScope": "Production"
}
}
}
}
}
Surely, This will help you.
I'm trying to create a server on SoftLayer through the API and specify a cloud-init script to run after install. Initially I thought that would be easy, through userData (http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject) but seems that's not the case as to what SoftLayer regards as userData.
I'm also having a hard time to find any examples of this working, so would highly appreciate any working example if anyone has achieved a cloud-init deployment on SoftLayer.
Thanks and regards,
Markos
“postInstallScriptUri” may help you to execute an script after provisioning.
This is a REST example:
https://[username]:[apikey]#api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/createObject
Method: POST
{
"parameters": [
{
"hostname": "myInstanceName",
"domain": "example.com",
"maxMemory": 4096,
"startCpus": 1,
"hourlyBillingFlag": true,
"localDiskFlag": false,
"operatingSystemReferenceCode": "UBUNTU_LATEST",
"datacenter": {
"name": "dal05"
},
"postInstallScriptUri": "https://www.softlayer.com"
}
]
}
References:
http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject section: postInstallScriptUri
https://sldn.softlayer.com/blog/jarteche/Getting-Started-User-Data-and-Post-Provisioning-Scripts
I hope it help you.
See documentation all the anwers are there https://sldn.softlayer.com/blog/jarteche/Getting-Started-User-Data-and-Post-Provisioning-Scripts
http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject
"postInstallScriptUri
Specifies the uri location of the script to be downloaded and run after installation is complete.
Optional
Type - string"
http://bodenr.blogspot.com/2014/04/giving-your-softlayer-servers.html
I'm try using Selendroid(version 0.7.0) for testing mobile version website. Can't start session. How valid parameters for start session ?
php/http examples likes.
Selendroid status:
curl 'http://localhost:4444/wd/hub/status'
{
"status":0,
"value":{
"supportedApps":[
],
"os":{
"arch":"amd64",
"name":"Linux",
"version":"3.2.0-58-generic"
},
"build":{
"browserName":"selendroid",
"version":"0.7.0"
},
"supportedDevices":[
{
"screenSize":"600x800",
"model":"VirtualBox",
"emulator":false,
"androidTarget":"ANDROID18"
},
{
"screenSize":"600x800",
"model":"VirtualBox",
"emulator":false,
"androidTarget":"ANDROID18"
},
{
"screenSize":"600x800",
"model":"VirtualBox",
"emulator":false,
"androidTarget":"ANDROID18"
}
]
}
}
Create session:
curl -d '{"desiredCapabilities":{"browserName":"selendroid","emulator":{"androidTarget":"ANDROID18"}}}' http://localhost:4444/wd/hub/session
{
"status":33,
"sessionId":"",
"value":{
"message":"The requested application under test is not configured in selendroid server.",
"class":"io.selendroid.exceptions.SessionNotCreatedException",
"stacktrace":[
"io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:257)",
"io.selendroid.server.handler.CreateSessionHandler.handle(CreateSessionHandler.java:42)",
"io.selendroid.server.SelendroidServlet.handleRequest(SelendroidServlet.java:130)",
"io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:81)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)",
"org.webbitserver.handler.PathMatchHandler.handleHttpRequest(PathMatchHandler.java:33)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)",
"org.webbitserver.handler.DateHeaderHandler.handleHttpRequest(DateHeaderHandler.java:21)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)",
"org.webbitserver.handler.ServerHeaderHandler.handleHttpRequest(ServerHeaderHandler.java:25)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)",
"org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:67)",
"org.webbitserver.netty.NettyHttpChannelHandler$2.run(NettyHttpChannelHandler.java:77)",
"java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)",
"java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)",
"java.lang.Thread.run(Thread.java:744)"
]
}
}
The capabilties are wrong in your curl command. Please use this one:
curl -d '{"desiredCapabilities":{"browserName":"android","emulator":True,"androidTarget":"ANDROID16"}}' http://localhost:4444/wd/hub/session
For testing the mobile web you have to use the browser name "android". The attribute "emulator" defines if an Android Emulator or a hardware device should be used. "androidTarget" is optional.
We are running a web application (shiny-server, where coding is done in R) and want to add an authentication layer to it.
Rather than building something to do this in R, I thought of using meteor to create auth tokens and all that.
This is the way i was thinking of doing it:
A user logs in with meteor and meteor creates a database entry that looks something like this:
{ "createdAt" : 1372521823708,
"_id" : "HSdbPBuYy5wW6FBPL",
"services" : { "password" : { "srp" : { "identity" : "vKpxEzXboBaQsWYyJ",
"salt" : "KRt5HrziG6RDnWN8o",
"verifier" : "8d4b6a5edd21ce710bd08c6affb6fec29a664fbf1f42823d5cb8cbd272cb9b2b3d5faa681948bc955353890f645b940ecdcc9376e88bc3dae77042d14901b5d22abd00d37a2022c32d925bbf839f65e4eb3a006354b918d5c8eadd2216cc2dbe0ce12e0ad90a383636a1327a91db72cf96cd4e672f68544eaea9591f6ed102e1" } },
"resume" : { "loginTokens" : [
{ "token" : "t9Dxkp4ANsYKuAQav",
"when" : 1372521823708 } ] } },
"emails" : [
{ "address" : "example#example.com",
"verified" : false } ] }
The user is redirected to the "old application". Here we check local storage (should be the same local storage as meteor if we use the same outward facing host and port, correct?)
and find this information:
Meteor.loginToken: t9Dxkp4ANsYKuAQav
Meteor.userId: HSdbPBuYy5wW6FBPL
The local storage data is investigated by "the other application" and it does a simple database query against the meteor db to verify that the local storage information matches what is in the database. Perhaps also check some kind of expiration date. If this matches, the application renders, otherwise it doesn't.
Is this a decently safe way to do it? Will it work to share local storage between the applications?
Of course you'll have to make sure that your WebSockets are running over TLS. LocalStorage uses a simple Same-origin Policy. So yes it will work. LocalStorage is as secure as a cookie so that's ok.
TLDR:
Yes and Yes