Skip to content

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.

}

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