1.1.0
This commit is contained in:
@@ -19,10 +19,6 @@ func VINSNATRuleListDataSourceCheckPresence(ctx context.Context, state *models.D
|
||||
VINSID: uint64(state.VinsID.ValueInt64()),
|
||||
}
|
||||
|
||||
if !state.Reason.IsNull() {
|
||||
req.Reason = state.Reason.ValueString()
|
||||
}
|
||||
|
||||
natRuleList, err := c.CloudBroker().VINS().NATRuleList(ctx, req)
|
||||
if err != nil {
|
||||
diags.AddError("Cannot get info about vins nat rule list", err.Error())
|
||||
|
||||
@@ -79,9 +79,7 @@ func CreateInRGResourceVINS(ctx context.Context, plan *models.ResourceVINSModel,
|
||||
} else {
|
||||
createReq.PreReservationsNum = uint64(plan.PreReservationsNum.ValueInt64())
|
||||
}
|
||||
if !plan.Reason.IsNull() {
|
||||
createReq.Reason = plan.Reason.ValueString()
|
||||
}
|
||||
|
||||
if !plan.DNS.IsNull() {
|
||||
result := make([]string, 0, len(plan.DNS.Elements()))
|
||||
for _, val := range plan.DNS.Elements() {
|
||||
@@ -135,10 +133,6 @@ func CreateInAccountResourceVINS(ctx context.Context, plan *models.ResourceVINSM
|
||||
createReq.PreReservationsNum = uint64(plan.PreReservationsNum.ValueInt64())
|
||||
}
|
||||
|
||||
if !plan.Reason.IsNull() {
|
||||
createReq.Reason = plan.Reason.ValueString()
|
||||
}
|
||||
|
||||
if !plan.DNS.IsNull() {
|
||||
result := make([]string, 0, len(plan.DNS.Elements()))
|
||||
for _, val := range plan.DNS.Elements() {
|
||||
@@ -193,9 +187,6 @@ func IPCreateVINS(ctx context.Context, vinsId uint64, plan *models.ResourceVINSM
|
||||
if ip.ComputeID.ValueInt64() != 0 {
|
||||
ipReserveReq.ComputeID = uint64(ip.ComputeID.ValueInt64())
|
||||
}
|
||||
if ip.Reason.ValueString() != "" {
|
||||
ipReserveReq.Reason = ip.Reason.ValueString()
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "IPCreateVINS: before calling CloudBroker().VINS().IPReserve", map[string]any{
|
||||
"vins_id": vinsId,
|
||||
@@ -299,9 +290,6 @@ func IPUpdateVINS(ctx context.Context, vinsId uint64, plan, state *models.Resour
|
||||
if addedIPItem.ComputeID.ValueInt64() != 0 {
|
||||
ipReserveReq.ComputeID = uint64(addedIPItem.ComputeID.ValueInt64())
|
||||
}
|
||||
if addedIPItem.Reason.ValueString() != "" {
|
||||
ipReserveReq.MAC = addedIPItem.Reason.ValueString()
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "IPUpdateVINS: before calling CloudBroker().VINS().IPReserve", map[string]any{
|
||||
"vins_id": vinsId,
|
||||
@@ -404,9 +392,6 @@ func NATRuleCreateVINS(ctx context.Context, vinsId uint64, plan *models.Resource
|
||||
if !nat.Proto.IsUnknown() {
|
||||
natAddReq.Proto = nat.Proto.ValueString()
|
||||
}
|
||||
if !nat.Reason.IsNull() {
|
||||
natAddReq.Reason = nat.Reason.ValueString()
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "NATRuleCreateVINS: before calling CloudBroker().VINS().NATRuleAdd", map[string]any{
|
||||
"vins_id": vinsId,
|
||||
@@ -511,10 +496,6 @@ func NATRuleUpdateVINS(ctx context.Context, vinsId uint64, plan, state *models.R
|
||||
RuleID: deletedNatRuleItem.RuleID.ValueInt64(),
|
||||
}
|
||||
|
||||
if deletedNatRuleItem.Reason.ValueString() != "" {
|
||||
deleteNATReq.Reason = deletedNatRuleItem.Reason.ValueString()
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "NATRuleUpdateVINS: before calling CloudBroker().VINS().NATRuleDel", map[string]any{"vins_id": plan.Id.ValueString(), "req": deleteNATReq})
|
||||
res, err := c.CloudBroker().VINS().NATRuleDel(ctx, deleteNATReq)
|
||||
tflog.Info(ctx, "NATRuleUpdateVINS: response from CloudBroker().VINS().NATRuleDel", map[string]any{"vins_id": plan.Id.ValueString(), "response": res})
|
||||
@@ -555,9 +536,6 @@ func NATRuleUpdateVINS(ctx context.Context, vinsId uint64, plan, state *models.R
|
||||
if !addedNatRuleItem.Proto.IsUnknown() {
|
||||
natAddReq.Proto = addedNatRuleItem.Proto.ValueString()
|
||||
}
|
||||
if !addedNatRuleItem.Reason.IsUnknown() {
|
||||
natAddReq.Reason = addedNatRuleItem.Reason.ValueString()
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "NATRuleUpdateVINS: before calling CloudBroker().VINS().NATRuleAdd", map[string]any{
|
||||
"vins_id": vinsId,
|
||||
@@ -756,10 +734,6 @@ func VnfdevRestartUpdateVINS(ctx context.Context, vinsId uint64, plan *models.Re
|
||||
VINSID: vinsId,
|
||||
}
|
||||
|
||||
if !plan.Reason.IsNull() {
|
||||
req.Reason = plan.Reason.ValueString()
|
||||
}
|
||||
|
||||
res, err := c.CloudBroker().VINS().VNFDevRestart(ctx, req)
|
||||
if err != nil {
|
||||
diags.AddError(
|
||||
@@ -784,10 +758,6 @@ func VnfdevRedeployUpdateVINS(ctx context.Context, vinsId uint64, plan *models.R
|
||||
VINSID: vinsId,
|
||||
}
|
||||
|
||||
if !plan.Reason.IsNull() {
|
||||
req.Reason = plan.Reason.ValueString()
|
||||
}
|
||||
|
||||
res, err := c.CloudBroker().VINS().VNFDevRedeploy(ctx, req)
|
||||
if err != nil {
|
||||
diags.AddError(
|
||||
@@ -812,10 +782,6 @@ func VnfdevResetUpdateVINS(ctx context.Context, vinsId uint64, plan *models.Reso
|
||||
VINSID: vinsId,
|
||||
}
|
||||
|
||||
if !plan.Reason.IsNull() {
|
||||
req.Reason = plan.Reason.ValueString()
|
||||
}
|
||||
|
||||
res, err := c.CloudBroker().VINS().VNFDevReset(ctx, req)
|
||||
if err != nil {
|
||||
diags.AddError(
|
||||
@@ -838,9 +804,7 @@ func VnfdevStartStopUpdateVINS(ctx context.Context, vinsId uint64, plan *models.
|
||||
req := vins.VNFDevStartRequest{
|
||||
VINSID: vinsId,
|
||||
}
|
||||
if !plan.Reason.IsNull() {
|
||||
req.Reason = plan.Reason.ValueString()
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "VnfdevResetUpdateVINS: before calling CloudBroker().VINS().VNFDevStart", map[string]any{"vinsId": vinsId})
|
||||
res, err := c.CloudBroker().VINS().VNFDevStart(ctx, req)
|
||||
if err != nil {
|
||||
@@ -857,9 +821,7 @@ func VnfdevStartStopUpdateVINS(ctx context.Context, vinsId uint64, plan *models.
|
||||
req := vins.VNFDevStopRequest{
|
||||
VINSID: vinsId,
|
||||
}
|
||||
if !plan.Reason.IsNull() {
|
||||
req.Reason = plan.Reason.ValueString()
|
||||
}
|
||||
|
||||
tflog.Info(ctx, "VnfdevResetUpdateVINS: before calling CloudBroker().VINS().VNFDevStop", map[string]any{"vinsId": vinsId})
|
||||
res, err := c.CloudBroker().VINS().VNFDevStop(ctx, req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user