Skip to content

Commit 97b1c35

Browse files
author
Francesco Fuggitti
committed
fix: remove commented code and apply formatting
1 parent 90e2302 commit 97b1c35

File tree

5 files changed

+6
-64
lines changed

5 files changed

+6
-64
lines changed

plugin/plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package plugin
22

33
var (
4-
Name = "dihedron-openstack"
5-
Kind = "source"
4+
Name = "dihedron-openstack"
5+
Kind = "source"
66
Version = "0.0.1"
77
)

resources/services/blockstorage/quotasets_usage.go

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func QuotaSetsUsage() *schema.Table {
1717
Name: "openstack_blockstorage_quotasets_usage",
1818
Resolver: fetchQuotaSetsUsage,
1919
Transform: transformers.TransformWithStruct(
20-
&QuotaUsageSet{},
20+
&quotasets.QuotaUsageSet{},
2121
transformers.WithNameTransformer(transform.TagNameTransformer), // use cq-name tags to translate name
2222
transformers.WithSkipFields("Volumes", "Snapshots", "Gigabytes", "PerVolumeGigabytes", "Backups", "BackupGigabytes", "Groups"),
2323
),
@@ -243,49 +243,3 @@ func fetchQuotaSetsUsage(ctx context.Context, meta schema.ClientMeta, parent *sc
243243
}
244244
return nil
245245
}
246-
247-
type QuotaUsageSet struct {
248-
ID string `json:"id"`
249-
Volumes struct {
250-
InUse int `json:"in_use" cq-name:"volumes_in_use"`
251-
Allocated int `json:"allocated" cq-name:"volumes_allocated"`
252-
Reserved int `json:"reserved" cq-name:"volumes_reserved"`
253-
Limit int `json:"limit" cq-name:"volumes_limit"`
254-
} `json:"volumes"`
255-
Snapshots struct {
256-
InUse int `json:"in_use" cq-name:"snapshots_in_use"`
257-
Allocated int `json:"allocated" cq-name:"snapshots_allocated"`
258-
Reserved int `json:"reserved" cq-name:"snapshots_reserved"`
259-
Limit int `json:"limit" cq-name:"snapshots_limit"`
260-
} `json:"snapshots"`
261-
Gigabytes struct {
262-
InUse int `json:"in_use" cq-name:"gigabytes_in_use"`
263-
Allocated int `json:"allocated" cq-name:"gigabytes_allocated"`
264-
Reserved int `json:"reserved" cq-name:"gigabytes_reserved"`
265-
Limit int `json:"limit" cq-name:"gigabytes_limit"`
266-
} `json:"gigabytes"`
267-
PerVolumeGigabytes struct {
268-
InUse int `json:"in_use" cq-name:"per_volume_gigabytes_in_use"`
269-
Allocated int `json:"allocated" cq-name:"per_volume_gigabytes_allocated"`
270-
Reserved int `json:"reserved" cq-name:"per_volume_gigabytes_reserved"`
271-
Limit int `json:"limit" cq-name:"per_volume_gigabytes_limit"`
272-
} `json:"per_volume_gigabytes"`
273-
Backups struct {
274-
InUse int `json:"in_use" cq-name:"backups_in_use"`
275-
Allocated int `json:"allocated" cq-name:"backups_allocated"`
276-
Reserved int `json:"reserved" cq-name:"backups_reserved"`
277-
Limit int `json:"limit" cq-name:"backups_limit"`
278-
} `json:"backups"`
279-
BackupGigabytes struct {
280-
InUse int `json:"in_use" cq-name:"backup_gigabytes_in_use"`
281-
Allocated int `json:"allocated" cq-name:"backup_gigabytes_allocated"`
282-
Reserved int `json:"reserved" cq-name:"backup_gigabytes_reserved"`
283-
Limit int `json:"limit" cq-name:"backup_gigabytes_limit"`
284-
} `json:"backup_gigabytes"`
285-
Groups struct {
286-
InUse int `json:"in_use" cq-name:"groups_in_use"`
287-
Allocated int `json:"allocated" cq-name:"groups_allocated"`
288-
Reserved int `json:"reserved" cq-name:"groups_reserved"`
289-
Limit int `json:"limit" cq-name:"groups_limit"`
290-
} `json:"groups"`
291-
}

resources/services/blockstorage/volumes.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,6 @@ func Volumes() *schema.Table {
2929
Relations: []*schema.Table{
3030
VolumesBackups(),
3131
},
32-
// Columns: []schema.Column{
33-
// {
34-
// Name: "tags",
35-
// Type: schema.TypeStringArray,
36-
// Description: "The set of tags on the project.",
37-
// Resolver: transform.Apply(
38-
// transform.OnObjectField("Tags"),
39-
// ),
40-
// },
41-
// },
4232
}
4333
}
4434

resources/services/compute/hypervisors.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ func Hypervisors() *schema.Table {
2121
transformers.WithTypeTransformer(transform.TagTypeTransformer), // use cq-type tags to translate type
2222
transformers.WithSkipFields("Links"),
2323
),
24-
Relations: []*schema.Table{
25-
// ImageMetadata(),
26-
// ImageProperties(),
27-
// ImageTags(),
28-
},
2924
}
3025
}
3126

resources/services/identity/domains.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ func Domains() *schema.Table {
1919
&domains.Domain{},
2020
transformers.WithSkipFields("Links"),
2121
),
22+
Relations: []*schema.Table{
23+
DomainGroups(),
24+
},
2225
}
2326
}
2427

0 commit comments

Comments
 (0)