solace-samples-semp icon indicating copy to clipboard operation
solace-samples-semp copied to clipboard

fix gradle issue for python and ruby

Open TamimiGitHub opened this issue 3 years ago • 1 comments

TamimiGitHub avatar Feb 08 '22 18:02 TamimiGitHub

Ok, so I did a bunch of stuff:

  • I undid most of the changes to the Gradle build files since a lot of it was just copied over from Java and was unnecessary; just needed to remove a left closure, and updated the codgen api version
  • updated the Ruby README since the instructions were wrong (typo in filenames)
  • updated all READMEs with corrected links for SEMP tutorials landing pages
  • updated Python and Ruby READMEs with correct usage of sample (username + password)
  • updated Python sample to work with Python3 (print statements)
  • added sample example to Ruby to make usage clear

Still outstanding!

I couldn't get the Python manage_vpn.py sample to work. It kept throwing an error, and spitting out a massive dump of something (the whole spec it looks like?):

$ python3 samples/manage_vpn.py create http://localhost:8080/SEMP/v2/config admin admin test
Creating Message-VPN: test
Error during operation. Details:
<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=EDGE"/>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.solace.com/apple-touch-icon.png">

And it goes on like that for a long time. I got the Ruby one working with the same params, and it correctly returned an error:

$ ruby -Ilib samples/manage_vpn.rb create http://localhost:8080/SEMP/v2/config admin admin test
Creating Message-VPN: test...
Error during operation. Details: {
    "meta":{
        "error":{
            "code":135,
            "description":"Problem with POST: Message VPN limit reached.",
            "status":"MAX_NUM_EXCEEDED"
        },
        "request":{
            "method":"POST",
            "uri":"http://localhost:8080/SEMP/v2/config/msgVpns"
        },
        "responseCode":400
    }
}

So @TamimiGitHub please find out what's wrong with the Python sample..? Or raise a new Issue to cover it I guess?

aaron-613 avatar Feb 09 '22 11:02 aaron-613