fix: rename type
This commit is contained in:
@@ -41,7 +41,7 @@ func TestCreate(t *testing.T) {
|
|||||||
require.NoError(t, err, "failed to marshal properties")
|
require.NoError(t, err, "failed to marshal properties")
|
||||||
|
|
||||||
req := &resource.CreateRequest{
|
req := &resource.CreateRequest{
|
||||||
ResourceType: "PROXMOX::Service::LXC",
|
ResourceType: "PROXMOX::Compute::LXC",
|
||||||
Properties: propertiesJSON,
|
Properties: propertiesJSON,
|
||||||
TargetConfig: testTargetConfig(),
|
TargetConfig: testTargetConfig(),
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ func TestRead(t *testing.T) {
|
|||||||
|
|
||||||
req := &resource.ReadRequest{
|
req := &resource.ReadRequest{
|
||||||
NativeID: strconv.Itoa(200),
|
NativeID: strconv.Itoa(200),
|
||||||
ResourceType: "PROXMOX::Service::LXC",
|
ResourceType: "PROXMOX::Compute::LXC",
|
||||||
TargetConfig: testTargetConfig(),
|
TargetConfig: testTargetConfig(),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ func TestUpdate(t *testing.T) {
|
|||||||
|
|
||||||
req := &resource.UpdateRequest{
|
req := &resource.UpdateRequest{
|
||||||
NativeID: "200",
|
NativeID: "200",
|
||||||
ResourceType: "PROXMOX::Service::LXC",
|
ResourceType: "PROXMOX::Compute::LXC",
|
||||||
PriorProperties: priorProperties,
|
PriorProperties: priorProperties,
|
||||||
DesiredProperties: desiredProperties,
|
DesiredProperties: desiredProperties,
|
||||||
TargetConfig: testTargetConfig(),
|
TargetConfig: testTargetConfig(),
|
||||||
@@ -143,7 +143,7 @@ func TestUpdate(t *testing.T) {
|
|||||||
|
|
||||||
readReq := &resource.ReadRequest{
|
readReq := &resource.ReadRequest{
|
||||||
NativeID: strconv.Itoa(200),
|
NativeID: strconv.Itoa(200),
|
||||||
ResourceType: "PROXMOX::Service::LXC",
|
ResourceType: "PROXMOX::Compute::LXC",
|
||||||
TargetConfig: testTargetConfig(),
|
TargetConfig: testTargetConfig(),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ func TestList(t *testing.T) {
|
|||||||
plugin := &Plugin{}
|
plugin := &Plugin{}
|
||||||
|
|
||||||
result, err := plugin.List(ctx, &resource.ListRequest{
|
result, err := plugin.List(ctx, &resource.ListRequest{
|
||||||
ResourceType: "PROXMOX::Service::LXC",
|
ResourceType: "PROXMOX::Compute::LXC",
|
||||||
TargetConfig: testTargetConfig(),
|
TargetConfig: testTargetConfig(),
|
||||||
})
|
})
|
||||||
require.NoError(t, err, "ListRequest should not return an error")
|
require.NoError(t, err, "ListRequest should not return an error")
|
||||||
@@ -190,7 +190,7 @@ func TestDelete(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
result, err := plugin.Delete(ctx, &resource.DeleteRequest{
|
result, err := plugin.Delete(ctx, &resource.DeleteRequest{
|
||||||
ResourceType: "PROXMOX::Service::LXC",
|
ResourceType: "PROXMOX::Compute::LXC",
|
||||||
TargetConfig: testTargetConfig(),
|
TargetConfig: testTargetConfig(),
|
||||||
NativeID: "200",
|
NativeID: "200",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ open class Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@formae.ResourceHint {
|
@formae.ResourceHint {
|
||||||
type = "PROXMOX::Service::LXC"
|
type = "PROXMOX::Compute::LXC"
|
||||||
identifier = "$.vmid"
|
identifier = "$.vmid"
|
||||||
discoverable = true
|
discoverable = true
|
||||||
}
|
}
|
||||||
class LXC extends formae.Resource {
|
class LXC extends formae.Resource {
|
||||||
fixed hidden type: String = "PROXMOX::Service::LXC"
|
fixed hidden type: String = "PROXMOX::Compute::LXC"
|
||||||
|
|
||||||
@formae.FieldHint { createOnly = true }
|
@formae.FieldHint { createOnly = true }
|
||||||
vmid: String
|
vmid: String
|
||||||
|
|||||||
Reference in New Issue
Block a user