$ --> solum assembly delete 08a0dd5b-f787-4692-87b3-2e8a44b0b4fe
Delete an assembly.
usage: solum [-h] [--os-username OS_USERNAME] [--os-password OS_PASSWORD]
[--os-tenant-name OS_TENANT_NAME] [--os-auth-url OS_AUTH_URL]
[--os-auth-token OS_AUTH_TOKEN] [--solum-url SOLUM_URL]
[--solum-api-version SOLUM_API_VERSION]
{app,assembly,languagepack} action assembly_uuid
positional arguments:
{app,assembly,languagepack}
Target noun to act upon
action Action to perform on resource
assembly_uuid Assembly uuid
optional arguments:
-h, --help show this help message and exit
--os-username OS_USERNAME
Defaults to env[OS_USERNAME]
--os-password OS_PASSWORD
Defaults to env[OS_PASSWORD]
--os-tenant-name OS_TENANT_NAME
Defaults to env[OS_TENANT_NAME]
--os-auth-url OS_AUTH_URL
Defaults to env[OS_AUTH_URL]
--os-auth-token OS_AUTH_TOKEN
Defaults to env[OS_AUTH_TOKEN]
--solum-url SOLUM_URL
Defaults to env[SOLUM_URL]
--solum-api-version SOLUM_API_VERSION
Defaults to env[SOLUM_API_VERSION] or 1
(IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`solum`.`component`, CONSTRAINT `component_ibfk_1` FOREIGN KEY (`assembly_id`) REFERENCES `assembly` (`id`))') 'DELETE FROM assembly WHERE assembly.id = %s' (1L,) (HTTP 500)
Just give more info on this:
solum-api log:
2014-04-25 15:35:30.372 30018 ERROR wsme.api [-] Server-side error: "(IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`solum` .`component` , CONSTRAINT `component_ibfk_1` FOREIGN KEY (`assembly_id`) REFERENCES `assembly` (`id`))') 'DELETE FROM assembly WHERE assembly.id = %s' (1L,)". Detail:
Traceback (most recent call last):
File "/usr/local/ lib/python2. 7/dist- packages/ wsmeext/ pecan.py" , line 77, in callfunction
result = f(self, *args, **kwargs)
File "/opt/stack/ solum/solum/ api/controllers /v1/assembly. py", line 58, in delete delete( self._id)
return handler.
File "/opt/stack/ solum/solum/ api/handlers/ assembly_ handler. py", line 68, in delete obj.destroy( self.context)
db_
File "/opt/stack/ solum/solum/ objects/ sqlalchemy/ models. py", line 132, in destroy by(id=self. id).\
filter_
File "/usr/local/ lib/python2. 7/dist- packages/ sqlalchemy/ orm/query. py", line 2661, in delete op.exec_ ()
delete_
File "/usr/local/ lib/python2. 7/dist- packages/ sqlalchemy/ orm/persistence .py", line 888, in exec_
self._do_exec()
File "/usr/local/ lib/python2. 7/dist- packages/ sqlalchemy/ orm/persistence .py", line 1013, in _do_exec self.query. _params)
params=
File "/opt/stack/ solum/solum/ openstack/ common/ db/sqlalchemy/ session. py", line 594, in _wrap DBError( e)
raise exception.
DBError: (IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`solum` .`component` , CONSTRAINT `component_ibfk_1` FOREIGN KEY (`assembly_id`) REFERENCES `assembly` (`id`))') 'DELETE FROM assembly WHERE assembly.id = %s' (1L,)
10.0.2.15 - - [25/Apr/2014 15:35:30] "DELETE /v1/assemblies/ 2dcf175e- 1721-4d53- a72c-59b863f0eb 00 HTTP/1.1" 500 318
mysql> show create table component; -----+- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----+
+------
| Table | Create Table ...