Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deactivate API to ruby bindings (bsc#1202705) #153

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

skazi0
Copy link
Contributor

@skazi0 skazi0 commented Sep 21, 2022

Existing functionalities used by CLI were exposed and can be called from ruby clients.

Closes #148

lslezak
lslezak previously approved these changes Oct 17, 2022
Copy link
Member

@lslezak lslezak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is what we need in YaST, thank you!

Just let me know in which version it will be released.

mssola
mssola previously approved these changes Nov 16, 2022
Copy link
Contributor

@mssola mssola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a way to test this, to be honest, but it looks good code-wise.

@djoreilly you are also listed as a reviewer on this, could you take a look? Thanks!

yast/lib/suse/connect/yast.rb Outdated Show resolved Hide resolved
@djoreilly
Copy link
Collaborator

Here's how I tested this. Downloaded rpms with browswer from https://build.opensuse.org/package/binaries/home:jzerebecki:CI:target:SUSE:connect-ng:PR-153/suseconnect-ng/openSUSE_Leap_15.3

mkdir /tmp/rpms
mv ~/Downloads/suseconne*rpm ~/Downloads/libsuseconnect-0.0.0_git.c72c299-lp153.20.1.x86_64.rpm /tmp/rpms/

docker run -it -v /tmp/rpms:/rpms --name test-pr153 registry.suse.com/bci/bci-base bash

zypper rm -y container-suseconnect
zypper in /rpms/*

SUSEConnect -r ...
SUSEConnect -p sle-module-containers/15.4/x86_64

zypper in ruby
irb
    require "suse/connect"
    p = OpenStruct.new(arch: "x86_64", identifier: "sle-module-containers", version: "15.4")
    SUSE::Connect::YaST.deactivate_product(p)
    # check SUSEConnect --status-text in another console
    SUSE::Connect::YaST.deactivate_system()
    # check SUSEConnect --status-text in another console

Existing functionalities used by CLI were exposed and can be called from
ruby clients.

Closes SUSE#148
@digitaltom
Copy link
Member

Is there a reason for this not being merged yet?

@djoreilly
Copy link
Collaborator

Is there a reason for this not being merged yet?

no - it just needed some reviews. I think it's okay to merge now.

@digitaltom digitaltom merged commit b8b4d1f into SUSE:main Dec 13, 2022
@lslezak
Copy link
Member

lslezak commented Dec 15, 2022

Thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add YaST API for unregistering a product or system
5 participants