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

Tiny tweaks ('del'ete and show login) #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

dirkx
Copy link

@dirkx dirkx commented Jan 2, 2019

Few tiny tweaks ot mc-cli to make it a bit more useful in automated issue/management settings.

@@ -67,7 +72,7 @@ func processDataCmd(subCmd, context, filename string, progressFunc ProgressCb) (
},
}

if subCmd == "get" {
if subCmd == "get" || subCmd == "del" {
Copy link
Owner

Choose a reason for hiding this comment

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

That's wrong... To delete a credential you need to put the device into "Memory Management Mode", and deal with the MMM api then. Your path add a del command that does the same as get... What the point?

@dirkx
Copy link
Author

dirkx commented Jan 7, 2019 via email

@raoulh
Copy link
Owner

raoulh commented Jan 7, 2019

del should delete a credential right?

The code does:

if subCmd == "get" || subCmd == "del" {
        m.Msg = "get_data_node"
}

So it sends get_data_node when you want to delete a credential. How could it work on your side then? Am I missing something?

@dirkx
Copy link
Author

dirkx commented Jan 7, 2019 via email

@dirkx
Copy link
Author

dirkx commented Jan 7, 2019 via email

@raoulh
Copy link
Owner

raoulh commented Jan 8, 2019

Ok, actually I misread the diff from github... It works for login, as it correctly set the command to del_credential.

The code where I commented is for data management, not credentials. And for that the code is actually not good, as it use the same get_data_node for the del command.

The del command for data management involves MMM. You need to send start_memorymgmt wait for the approval on the device, then send delete_data_nodes with a list of data sercices to delete

For this PR, it would be ok for me to just merge the delete part for credentials. But you would need to remove the data part as it is not good as it is.

@dirkx
Copy link
Author

dirkx commented Jan 8, 2019 via email

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.

2 participants