Skip to content

Commit c49aa7d

Browse files
Fixed bug in Device Create - Set baseos version using Publish API as part of create. (#23)
* Fixed bug in Device Create - Set baseos version using Publish API as part of create. * Update Schema documentation with changes for fields to support device create * Fixed bugs in tests introduced by the Create device fix
1 parent 2f2bb84 commit c49aa7d

File tree

6 files changed

+220
-198
lines changed

6 files changed

+220
-198
lines changed

docs/data-sources/edgenode.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,33 @@ Schema for data source zedcloud_edgenode. Must specify id or name
2121

2222
### Optional
2323

24+
- **adminstate_config** (String) Administrative state of device. Required field. Valid Values to configure: ADMIN_STATE_ACTIVE, ADMIN_STATE_INACTIVE
2425
- **asset_id** (String) Device asset ID
2526
- **client_ip** (String) Client IP
2627
- **config_items** (Map of String) EVE Runtime Configuration Properties
2728
- **description** (String) Detailed description of the Object
2829
- **dev_location** (Block List) User specified geo location (see [below for nested schema](#nestedblock--dev_location))
2930
- **eve_image_version** (String) Verion of EVE-OS image to be used by the Edge Node
3031
- **interface** (Block Set) System Interface Set (see [below for nested schema](#nestedblock--interface))
32+
- **model_id** (String) ID of device model object for the Edge Node
33+
- **onboard_key** (String) Onboard Key for the device
34+
- **project_id** (String) ID of the project to which the Object belongs
35+
- **serialno** (String) Edge Node serial number
3136
- **tags** (Map of String) Tags are name/value pairs that enable you to categorize resources. Tag names are case insensitive with max_length 512 and min_length 3. Tag values are case sensitive with max_length 256 and min_length 3
3237
- **title** (String) User defined title of the object. title can be changed any time.
3338

3439
### Read-Only
3540

36-
- **adminstate** (String) Administrative state of device
41+
- **adminstate** (String) Current Administrative state of device. Apart from states specified in adminstate_config field, this can also be in ADMIN_STATE_REGISTERED (Device is Active and registered)
3742
- **cluster_id** (String) ID of the Cluster to which the Edge Node belongs.
3843
- **cpu** (Number) CPU (configured values)
3944
- **id** (String) System defined unique Id of the Object
4045
- **memory** (Number) Device memory in MBs
41-
- **model_id** (String) ID of device model object for the Edge Node
42-
- **project_id** (String) ID of the project to which the Object belongs
4346
- **reset_counter** (Number) Reset Counter Value
4447
- **reset_time** (String) Edge Node Last Reset Time
4548
- **revision** (List of Object) System defined revision information of the object (see [below for nested schema](#nestedatt--revision))
46-
- **serialno** (String) Edge Node serial number
4749
- **storage** (Number) Device storage in GBs
48-
- **thread** (Number) Threads
50+
- **thread** (Number) Number of Threads
4951
- **utype** (String) Device Model Archecture Type
5052

5153
<a id="nestedblock--dev_location"></a>

docs/resources/edgenode.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,33 @@ description: |-
2121

2222
### Optional
2323

24+
- **adminstate_config** (String) Administrative state of device. Required field. Valid Values to configure: ADMIN_STATE_ACTIVE, ADMIN_STATE_INACTIVE
2425
- **asset_id** (String) Device asset ID
2526
- **client_ip** (String) Client IP
2627
- **config_items** (Map of String) EVE Runtime Configuration Properties
2728
- **description** (String) Detailed description of the Object
2829
- **dev_location** (Block List) User specified geo location (see [below for nested schema](#nestedblock--dev_location))
2930
- **eve_image_version** (String) Verion of EVE-OS image to be used by the Edge Node
3031
- **interface** (Block Set) System Interface Set (see [below for nested schema](#nestedblock--interface))
32+
- **model_id** (String) ID of device model object for the Edge Node
33+
- **onboard_key** (String) Onboard Key for the device
34+
- **project_id** (String) ID of the project to which the Object belongs
35+
- **serialno** (String) Edge Node serial number
3136
- **tags** (Map of String) Tags are name/value pairs that enable you to categorize resources. Tag names are case insensitive with max_length 512 and min_length 3. Tag values are case sensitive with max_length 256 and min_length 3
3237
- **title** (String) User defined title of the object. title can be changed any time.
3338

3439
### Read-Only
3540

36-
- **adminstate** (String) Administrative state of device
41+
- **adminstate** (String) Current Administrative state of device. Apart from states specified in adminstate_config field, this can also be in ADMIN_STATE_REGISTERED (Device is Active and registered)
3742
- **cluster_id** (String) ID of the Cluster to which the Edge Node belongs.
3843
- **cpu** (Number) CPU (configured values)
3944
- **id** (String) System defined unique Id of the Object
4045
- **memory** (Number) Device memory in MBs
41-
- **model_id** (String) ID of device model object for the Edge Node
42-
- **project_id** (String) ID of the project to which the Object belongs
4346
- **reset_counter** (Number) Reset Counter Value
4447
- **reset_time** (String) Edge Node Last Reset Time
4548
- **revision** (List of Object) System defined revision information of the object (see [below for nested schema](#nestedatt--revision))
46-
- **serialno** (String) Edge Node serial number
4749
- **storage** (Number) Device storage in GBs
48-
- **thread** (Number) Threads
50+
- **thread** (Number) Number of Threads
4951
- **utype** (String) Device Model Archecture Type
5052

5153
<a id="nestedblock--dev_location"></a>

provider/data_source_edgenode.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ func flattenDeviceConfig(cfg *swagger_models.DeviceConfig, computedOnly bool) ma
115115
"utype": ptrValStr(cfg.Utype),
116116
}
117117
if !computedOnly {
118+
data["adminstate_config"] = ptrValStr(cfg.AdminState)
118119
data["asset_id"] = cfg.AssetID
119120
data["client_ip"] = cfg.ClientIP
120121
data["config_items"] = flattenEDConfigItems(cfg.ConfigItem)

0 commit comments

Comments
 (0)