4.9.0
This commit is contained in:
@@ -270,6 +270,13 @@ func dataSourceExtnetSchemaMake() map[string]*schema.Schema {
|
||||
},
|
||||
},
|
||||
},
|
||||
"ntp": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
},
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
@@ -107,6 +107,11 @@ func dataSourceExtnetListSchemaMake() map[string]*schema.Schema {
|
||||
Optional: true,
|
||||
Description: "Page size",
|
||||
},
|
||||
"ovs_bridge": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: "Name of the openVswitch bridge",
|
||||
},
|
||||
"items": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
|
||||
@@ -24,6 +24,7 @@ func flattenExtnet(d *schema.ResourceData, e *extnet.RecordExtNet) {
|
||||
d.Set("net_name", e.Name)
|
||||
d.Set("network", e.Network)
|
||||
d.Set("network_id", e.NetworkID)
|
||||
d.Set("ntp", e.NTP)
|
||||
d.Set("pre_reservations_num", e.PreReservationsNum)
|
||||
d.Set("prefix", e.Prefix)
|
||||
d.Set("pri_vnf_dev_id", e.PriVNFDevID)
|
||||
|
||||
@@ -46,11 +46,11 @@ func utilityExtnetListCheckPresence(ctx context.Context, d *schema.ResourceData,
|
||||
c := m.(*controller.ControllerCfg)
|
||||
req := extnet.ListRequest{}
|
||||
|
||||
if accountId, ok := d.GetOk("account_id"); ok {
|
||||
req.AccountID = uint64(accountId.(int))
|
||||
if accountID, ok := d.GetOk("account_id"); ok {
|
||||
req.AccountID = uint64(accountID.(int))
|
||||
}
|
||||
if by_id, ok := d.GetOk("by_id"); ok {
|
||||
req.ByID = uint64(by_id.(int))
|
||||
if byID, ok := d.GetOk("by_id"); ok {
|
||||
req.ByID = uint64(byID.(int))
|
||||
}
|
||||
if name, ok := d.GetOk("name"); ok {
|
||||
req.Name = name.(string)
|
||||
@@ -58,11 +58,11 @@ func utilityExtnetListCheckPresence(ctx context.Context, d *schema.ResourceData,
|
||||
if network, ok := d.GetOk("network"); ok {
|
||||
req.Network = network.(string)
|
||||
}
|
||||
if vlan_id, ok := d.GetOk("vlan_id"); ok {
|
||||
req.VLANID = uint64(vlan_id.(int))
|
||||
if vlanID, ok := d.GetOk("vlan_id"); ok {
|
||||
req.VLANID = uint64(vlanID.(int))
|
||||
}
|
||||
if vnfdev_id, ok := d.GetOk("vnfdev_id"); ok {
|
||||
req.VNFDevID = uint64(vnfdev_id.(int))
|
||||
if vnfDevID, ok := d.GetOk("vnfdev_id"); ok {
|
||||
req.VNFDevID = uint64(vnfDevID.(int))
|
||||
}
|
||||
if status, ok := d.GetOk("status"); ok {
|
||||
req.Status = status.(string)
|
||||
@@ -77,6 +77,10 @@ func utilityExtnetListCheckPresence(ctx context.Context, d *schema.ResourceData,
|
||||
req.Size = uint64(size.(int))
|
||||
}
|
||||
|
||||
if ovsBridge, ok := d.GetOk("ovs_bridge"); ok {
|
||||
req.OVSBridge = ovsBridge.(string)
|
||||
}
|
||||
|
||||
log.Debugf("utilityExtnetListCheckPresence")
|
||||
extnetList, err := c.CloudAPI().ExtNet().List(ctx, req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user