Skip to content

Commit

Permalink
Update EndpointOper fields (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvavili authored and shaleman committed Jul 20, 2016
1 parent 8e88827 commit 19aff69
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions client/contivModelClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,16 @@ type BgpInspect struct {
}

type EndpointOper struct {
AttachUUID string `json:"attachUUID,omitempty"` //
ContainerID string `json:"containerID,omitempty"` //
ContainerName string `json:"containerName,omitempty"` //
EndpointGroupID int `json:"endpointGroupId,omitempty"` //
EndpointGroupKey string `json:"endpointGroupKey,omitempty"` //
EndpointID string `json:"endpointID,omitempty"` //
HomingHost string `json:"homingHost,omitempty"` //
IntfName string `json:"intfName,omitempty"` //
IpAddress []string `json:"ipAddress,omitempty"`
Labels string `json:"labels,omitempty"` //
MacAddress string `json:"macAddress,omitempty"` //
Name string `json:"name,omitempty"` //
Network string `json:"network,omitempty"` //
ServiceName string `json:"serviceName,omitempty"` //
VtepIP string `json:"vtepIP,omitempty"` //
Expand Down Expand Up @@ -696,9 +696,9 @@ func (c *ContivClient) BgpInspect(hostname string) (*BgpInspect, error) {
}

// EndpointInspect gets the endpointInspect object
func (c *ContivClient) EndpointInspect(name string) (*EndpointInspect, error) {
func (c *ContivClient) EndpointInspect(endpointID string) (*EndpointInspect, error) {
// build key and URL
keyStr := name
keyStr := endpointID
url := c.baseURL + "/api/v1/inspect/endpoints/" + keyStr + "/"

// http get the object
Expand Down
2 changes: 1 addition & 1 deletion client/contivModelClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def listBgp(self):

# Inspect endpoint
def createEndpoint(self, obj):
postUrl = self.baseUrl + '/api/v1/inspect/endpoint/' + obj.name + '/'
postUrl = self.baseUrl + '/api/v1/inspect/endpoint/' + obj.endpointID + '/'

retDate = urllib2.urlopen(postUrl)
if retData == "Error":
Expand Down
4 changes: 2 additions & 2 deletions contivModel.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ type EndpointOper struct {
// oper object key (present for oper only objects)
Key string `json:"key,omitempty"`

AttachUUID string `json:"attachUUID,omitempty"` //
ContainerID string `json:"containerID,omitempty"` //
ContainerName string `json:"containerName,omitempty"` //
EndpointGroupID int `json:"endpointGroupId,omitempty"` //
EndpointGroupKey string `json:"endpointGroupKey,omitempty"` //
EndpointID string `json:"endpointID,omitempty"` //
HomingHost string `json:"homingHost,omitempty"` //
IntfName string `json:"intfName,omitempty"` //
IpAddress []string `json:"ipAddress,omitempty"`
Labels string `json:"labels,omitempty"` //
MacAddress string `json:"macAddress,omitempty"` //
Name string `json:"name,omitempty"` //
Network string `json:"network,omitempty"` //
ServiceName string `json:"serviceName,omitempty"` //
VtepIP string `json:"vtepIP,omitempty"` //
Expand Down
10 changes: 5 additions & 5 deletions endpoint.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"name": "endpoint",
"version": "v1",
"type": "object",
"key": [ "name" ],
"key": [ "endpointID" ],
"operProperties": {
"network": {
"type": "string"
},
"name": {
"endpointID": {
"type": "string"
},
"serviceName": {
Expand All @@ -25,9 +25,6 @@
"endpointGroupKey": {
"type": "string"
},
"attachUUID": {
"type": "string"
},
"ipAddress": {
"type": "array",
"items": "string"
Expand All @@ -49,6 +46,9 @@
},
"containerID": {
"type": "string"
},
"containerName": {
"type": "string"
}
}
}
Expand Down

0 comments on commit 19aff69

Please sign in to comment.