Skip to content

Commit

Permalink
Fix docs for device.config_var.set
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
otaviojacobi committed Oct 25, 2024
1 parent 26400c2 commit 4c42649
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2244,15 +2244,15 @@ Remove a device environment variable.
### Function: set(uuid_or_id, env_var_name, value) ⇒ <code>None</code>

Set the value of a device config variable.

Note that config variables must start with BALENA_ and RESIN_ prefixes.
#### Args:
uuid_or_id (Union[str, int]): device uuid (string) or id (int)
env_var_name (str): environment variable name.
value (str): environment variable value.

#### Examples:
```python
>>> balena.models.device.config_var.device.set('8deb12','test_env4', 'testing1')
>>> balena.models.device.config_var.set('8deb12','BALENA_test_env4', 'testing1')
```
## DeviceEnvVariable

Expand Down
4 changes: 2 additions & 2 deletions balena/models/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -2145,14 +2145,14 @@ def get(self, uuid_or_id: Union[str, int], env_var_name: str) -> Optional[str]:
def set(self, uuid_or_id: Union[str, int], env_var_name: str, value: str) -> None:
"""
Set the value of a device config variable.
Note that config variables must start with BALENA_ and RESIN_ prefixes.
Args:
uuid_or_id (Union[str, int]): device uuid (string) or id (int)
env_var_name (str): environment variable name.
value (str): environment variable value.
Examples:
>>> balena.models.device.config_var.device.set('8deb12','test_env4', 'testing1')
>>> balena.models.device.config_var.set('8deb12','BALENA_test_env4', 'testing1')
"""
super(DeviceConfigVariable, self)._set(uuid_or_id, env_var_name, value)

Expand Down

0 comments on commit 4c42649

Please sign in to comment.