PDA

View Full Version : Delete registrations in SCC via command line?



lorenzgoebel
10-Aug-2018, 14:54
Hello,

we would like to list and delete registrations - e.g. registered SLES servers - in SCC via command line from a local system. I thought it might be possible by using SMT. So I installed SMT, linked it to SCC with our mirror credentials and performed an smt-scc-sync. However, smt-list-registrations still lists no registrations. Trying to delete a registration from SCC by using smt-delete-registration fails because the registration cannot be found locally (on SMT).

Is SMT supposed to see and be able to manage registrations which are only in SCC? If yes, did I do something wrong?

Is there any other good way to delete hundereds of registrations from SCC via command line or script?

Best regards

smflood
13-Aug-2018, 12:41
On 10/08/18 15:04, lorenzgoebel wrote:

> we would like to list and delete registrations - e.g. registered SLES
> servers - in SCC via command line from a local system. I thought it
> might be possible by using SMT. So I installed SMT, linked it to SCC
> with our mirror credentials and performed an smt-scc-sync. However,
> smt-list-registrations still lists no registrations. Trying to delete a
> registration from SCC by using smt-delete-registration fails because the
> registration cannot be found locally (on SMT).

The SMT commands related to registration deal with systems registered to
the SMT server not to SCC in general.

> Is SMT supposed to see and be able to manage registrations which are
> only in SCC? If yes, did I do something wrong?

So if you have a system registered to your local SMT server it should
show up via smt-list-registrations.

> Is there any other good way to delete hundereds of registrations from
> SCC via command line or script?

There is an API available - please see
https://github.com/SUSE/connect/blob/master/doc/SCC-API-(Implemented).md
.. I think you should be able to use 'destroy system' -
https://github.com/SUSE/connect/blob/master/doc/SCC-API-(Implemented).md#destroy-system-of-organization


HTH.
--
Simon
SUSE Knowledge Partner

------------------------------------------------------------------------
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.
------------------------------------------------------------------------