Options
All
  • Public
  • Public/Protected
  • All
Menu

Module balenaSDK helpers

The BalenaSDK class contains an instance of the balena sdk, as well as some helper methods to interact with a device via the cloud. The balena attribute of the class contains the sdk,and can be used as follows in a test suite:

example
const Cloud = this.require("components/balena/sdk");

this.suite.context.set({
 cloud: new Balena("https://api.balena-cloud.com/", this.getLogger())
});

// login
await this.context
 .get()
 .cloud.balena.auth.loginWithToken(this.suite.options.balena.apiKey);

// create a balena application
await this.context.get().cloud.balena.models.application.create({
    name: `NAME`,
    deviceType: `DEVICE_TYPE`,
 organization: `ORG`,
});

Index

Classes

Generated using TypeDoc