The values from the SO service instance deletion.
So take that SQL and update the fields.

sdnctl.GENERIC_RESOURCE_NAME -  failed because context-id and prefix was null.

Obviously only in a TEST LAB for a service name you want to delete.

I do not know if this will solve your problem but it is what I would try in 
integration testing to resolve the blocker.

The real fix has to wait for a DG update I think.

Brian


root@sb04-rancher:/home/ubuntu# kubectl -n onap exec -it 
dev-mariadb-galera-mariadb-galera-0 bash
bash-4.2$ mysql -u sdnctl -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 311793
Server version: 10.1.24-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use sdnctl;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [sdnctl]> desc GENERIC_RESOURCE_NAME;
+------------+--------------+------+-----+---------+-------+
| Field      | Type         | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| type       | varchar(50)  | NO   | PRI | NULL    |       |
| name       | varchar(255) | NO   | PRI | NULL    |       |
| prefix     | varchar(255) | YES  |     | NULL    |       |
| name_index | int(11)      | YES  |     | NULL    |       |
| context_id | varchar(255) | YES  |     | NULL    |       |
+------------+--------------+------+-----+---------+-------+
5 rows in set (0.00 sec)

MariaDB [sdnctl]> select * from GENERIC_RESOURCE_NAME;
+------------------+------------------------------------------------------+--------+------------+------------+
| type             | name                                                 | 
prefix | name_index | context_id |
+------------------+------------------------------------------------------+--------+------------+------------+
| SERVICE_INSTANCE | June-2019--01                                        | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | June-2019--02                                        | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | June-2019--03                                        | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Name04af1e23-d5e8-4475-b49f-4c167cdd03c0 | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Name189aabbb-a972-4b85-849e-730d8559dc0a | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Name4aa627c3-7b11-450a-9a69-bd7c450b86e5 | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Name8217439b-a02e-4415-ba54-4c262edc2b0d | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Namec9e6e3ca-f761-443f-8248-d882fbd13c7b | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Namecb35fb06-cedf-4f50-8dbb-2a6ecfef9822 | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Named24ef2bf-7163-4d33-a9b4-11d7972074c3 | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Named6e51073-31b3-4910-ad5e-19d8f671845a | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Namedc19de89-410a-48f8-a819-05c4d2a008cf | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Namee48dbd8f-1a96-467d-8a31-458d4b3e756b | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Nameefe0d322-53b8-4f0e-9053-e315685be282 | 
NULL   |       NULL | NULL       |
+------------------+------------------------------------------------------+--------+------------+------------+
14 rows in set (0.00 sec)

MariaDB [sdnctl]> update GENERIC_RESOURCE_NAME set name_index=1, context_id='1' 
where name='Service_Ete_Name04af1e23-d5e8-4475-b49f-4c167cdd03c0';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [sdnctl]> select * from GENERIC_RESOURCE_NAME;
+------------------+------------------------------------------------------+--------+------------+------------+
| type             | name                                                 | 
prefix | name_index | context_id |
+------------------+------------------------------------------------------+--------+------------+------------+
| SERVICE_INSTANCE | June-2019--01                                        | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | June-2019--02                                        | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | June-2019--03                                        | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Name04af1e23-d5e8-4475-b49f-4c167cdd03c0 | 
NULL   |          1 | 1          |
| SERVICE_INSTANCE | Service_Ete_Name189aabbb-a972-4b85-849e-730d8559dc0a | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Name4aa627c3-7b11-450a-9a69-bd7c450b86e5 | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Name8217439b-a02e-4415-ba54-4c262edc2b0d | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Namec9e6e3ca-f761-443f-8248-d882fbd13c7b | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Namecb35fb06-cedf-4f50-8dbb-2a6ecfef9822 | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Named24ef2bf-7163-4d33-a9b4-11d7972074c3 | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Named6e51073-31b3-4910-ad5e-19d8f671845a | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Namedc19de89-410a-48f8-a819-05c4d2a008cf | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Namee48dbd8f-1a96-467d-8a31-458d4b3e756b | 
NULL   |       NULL | NULL       |
| SERVICE_INSTANCE | Service_Ete_Nameefe0d322-53b8-4f0e-9053-e315685be282 | 
NULL   |       NULL | NULL       |
+------------------+------------------------------------------------------+--------+------------+------------+
14 rows in set (0.00 sec)

MariaDB [sdnctl]>


From: Rahul Sharma <[email protected]>
Sent: Friday, June 21, 2019 3:53 PM
To: FREEMAN, BRIAN D <[email protected]>; [email protected]
Subject: Re: [onap-discuss] Cannot reuse ServiceInstance Name when re-creating 
a service #sdnc

Thank you Brian for the reply and the workaround.

However, I am not sure we understood the workaround you are suggesting:

When you say "update the model table to allow the removal of the service 
instance by setting the null values the values in the incoming request":

  *   Which model table are you referring to?
  *   Which incoming request - the request that's received by SDNC 
GENERIC-RESOURCE-API or the request sent to SO for Service Instance deletion?
  *   which values should be set to null.
If you have an example payload, that would be awesome.

Regards,
Rahul

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#17704): https://lists.onap.org/g/onap-discuss/message/17704
Mute This Topic: https://lists.onap.org/mt/32131591/21656
Mute #sdnc: https://lists.onap.org/mk?hashtag=sdnc&subid=2740164
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to