Skip to content

Controllers management#93

Open
vicalro wants to merge 20 commits into
bisdn:integration-0.8from
vicalro:controllers_management
Open

Controllers management#93
vicalro wants to merge 20 commits into
bisdn:integration-0.8from
vicalro:controllers_management

Conversation

@vicalro

@vicalro vicalro commented Jul 28, 2015

Copy link
Copy Markdown
Contributor

This PR adds the features of adding, removing and listing controllers to LSIs trough the REST plugin.
Examples on how to use it can be found in the xcli tool.

In order to use the list feature, the API of rofl-common needs to be extended. You may find an extension in vicalro/rofl-common@3d251d6 (branch list_controllers)

@msune msune added this to the v0.8.0 milestone Jul 28, 2015
@msune

msune commented Jul 29, 2015

Copy link
Copy Markdown
Contributor

List controllers and show controller info should not need -m option:

xcli(local)>show lsi dp0 controllers
ERROR(401): HTTP/GET 'http://127.0.0.1:5757/info/lsi/dp0/controllers'
Unauthorised; is mgmt support enabled (-m)?

xcli(local)>show lsi dp0 controller 0
ERROR(401): HTTP/GET 'http://127.0.0.1:5757/info/lsi/dp0/controller/0'
Unauthorised; is mgmt support enabled (-m)?

xcli(local)>

@msune

msune commented Jul 29, 2015

Copy link
Copy Markdown
Contributor
xcli(local)>show lsi dp0 controller 0
{
    "Controller" : {
        "id" : 0,
        "channel-status" : "not-established",
        "mode" : "equal",
        "connections" : {
            "0" : {
                "protocol-type" : "plain",
                "ip" : "127.0.0.1",
                "port" : 6653
            }
        }
    }
}

xcli(local)>

"Controller" -> "controller"

And:

xcli(local)>exec add controller dp0 tcp:192.168.1.1:6633
{                                                        
    "assigned id" : 1                                    
}

I think for consistency (list controllers) should be:

xcli(local)>exec add controller dp0 tcp:192.168.1.1:6633
{                                                        
    "controller-id" : 1
}

@msune

msune commented Jul 29, 2015

Copy link
Copy Markdown
Contributor

Exec with bad parameters dos not send an HTTP 500 error, although it fails to add it:

xcli(local)>exec add controller dp0 tcp:192.168.1.1::6633

xcli(local)>show lsi dp0 controllers
{
    "controller-ids" : [
    ]
}

xcli(local)>exec add controller dp0 tcp192.168.1.1::6633

xcli(local)>show lsi dp0 controllers 
{
    "controller-ids" : [
    ]
}

xcli(local)>exec add controller dp0 tcp45654654192.168.1.1::6633

xcli(local)>show lsi dp0 controllers
{
    "controller-ids" : [
    ]
}

@msune

msune commented Jul 29, 2015

Copy link
Copy Markdown
Contributor

New APIs are not listed in the index (GET to root):

e.g. http://10.0.0.2:5757/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

extra space. Authorisization here is not needed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

space

- List and show controllers don't require authorized access
- Fixed return message after adding a new controller
- Capturing exception when parsing the parameters of the new controller in xcli
- New APIs listed in the index
@vicalro

vicalro commented Jul 29, 2015

Copy link
Copy Markdown
Contributor Author

Thanks for the comments. Issues fixed. Check it out!

@msune

msune commented Jul 29, 2015

Copy link
Copy Markdown
Contributor

ACK. But we need to merge the list_controllers into rofl-common, but first bisdn/rofl-common#17 needs to be fixed, since the commit needs to go on top of integration-0.6 as agreed.

Holding it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants