Skip to content

Commit

Permalink
add list of endpoints in network oper
Browse files Browse the repository at this point in the history
  • Loading branch information
Vipin Jain committed Jun 17, 2016
1 parent 2b89513 commit 30e5f84
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 123 deletions.
123 changes: 12 additions & 111 deletions client/contivModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,7 @@ var EndpointGroupSummaryView = React.createClass({
<ModalTrigger modal={<EndpointGroupModalView endpointGroup={ endpointGroup }/>}>
<tr key={ endpointGroup.key } className="info">


<td>{ endpointGroup.extContractsGrps }</td>

<td>{ endpointGroup.groupName }</td>

<td>{ endpointGroup.networkName }</td>

<td>{ endpointGroup.policies }</td>


</tr>
</ModalTrigger>
);
Expand All @@ -207,11 +199,7 @@ var EndpointGroupSummaryView = React.createClass({
<thead>
<tr>


<th> External contracts </th>
<th> Group name </th>
<th> Network </th>
<th> Policies </th>

</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -262,13 +250,7 @@ var ExtContractsGroupSummaryView = React.createClass({
<ModalTrigger modal={<ExtContractsGroupModalView extContractsGroup={ extContractsGroup }/>}>
<tr key={ extContractsGroup.key } className="info">


<td>{ extContractsGroup.contractsGroupName }</td>

<td>{ extContractsGroup.contractsType }</td>

<td>{ extContractsGroup.tenantName }</td>


</tr>
</ModalTrigger>
);
Expand All @@ -280,10 +262,7 @@ var ExtContractsGroupSummaryView = React.createClass({
<thead>
<tr>


<th> Contracts group name </th>
<th> Contracts type </th>
<th> Tenant name </th>

</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -332,11 +311,7 @@ var GlobalSummaryView = React.createClass({
<ModalTrigger modal={<GlobalModalView global={ global }/>}>
<tr key={ global.key } className="info">


<td>{ global.name }</td>

<td>{ global.networkInfraType }</td>


</tr>
</ModalTrigger>
);
Expand All @@ -348,9 +323,7 @@ var GlobalSummaryView = React.createClass({
<thead>
<tr>


<th> name of this block(must be 'global') </th>
<th> Network infrastructure type </th>

</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -399,23 +372,7 @@ var NetworkSummaryView = React.createClass({
<ModalTrigger modal={<NetworkModalView network={ network }/>}>
<tr key={ network.key } className="info">


<td>{ network.encap }</td>

<td>{ network.gateway }</td>

<td>{ network.ipv6Gateway }</td>

<td>{ network.ipv6Subnet }</td>

<td>{ network.networkName }</td>

<td>{ network.nwType }</td>

<td>{ network.pktTag }</td>

<td>{ network.subnet }</td>


</tr>
</ModalTrigger>
);
Expand All @@ -427,15 +384,7 @@ var NetworkSummaryView = React.createClass({
<thead>
<tr>


<th> Encapsulation </th>
<th> Gateway </th>
<th> IPv6Gateway </th>
<th> IPv6Subnet </th>
<th> Network name </th>
<th> Network Type </th>
<th> Vlan/Vxlan Tag </th>
<th> Subnet </th>

</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -494,11 +443,7 @@ var PolicySummaryView = React.createClass({
<ModalTrigger modal={<PolicyModalView policy={ policy }/>}>
<tr key={ policy.key } className="info">


<td>{ policy.policyName }</td>

<td>{ policy.tenantName }</td>


</tr>
</ModalTrigger>
);
Expand All @@ -510,9 +455,7 @@ var PolicySummaryView = React.createClass({
<thead>
<tr>


<th> Policy Name </th>
<th> Tenant Name </th>

</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -557,35 +500,7 @@ var RuleSummaryView = React.createClass({
<ModalTrigger modal={<RuleModalView rule={ rule }/>}>
<tr key={ rule.key } className="info">


<td>{ rule.action }</td>

<td>{ rule.direction }</td>

<td>{ rule.fromEndpointGroup }</td>

<td>{ rule.fromIpAddress }</td>

<td>{ rule.fromNetwork }</td>

<td>{ rule.policyName }</td>

<td>{ rule.port }</td>

<td>{ rule.priority }</td>

<td>{ rule.protocol }</td>

<td>{ rule.ruleId }</td>

<td>{ rule.tenantName }</td>

<td>{ rule.toEndpointGroup }</td>

<td>{ rule.toIpAddress }</td>

<td>{ rule.toNetwork }</td>


</tr>
</ModalTrigger>
);
Expand All @@ -597,21 +512,7 @@ var RuleSummaryView = React.createClass({
<thead>
<tr>


<th> Action </th>
<th> Direction </th>
<th> From Endpoint Group </th>
<th> IP Address </th>
<th> From Network </th>
<th> Policy Name </th>
<th> Port No </th>
<th> Priority </th>
<th> Protocol </th>
<th> Rule Id </th>
<th> Tenant Name </th>
<th> To Endpoint Group </th>
<th> IP Address </th>
<th> To Network </th>

</tr>
</thead>
<tbody>
Expand Down
13 changes: 7 additions & 6 deletions client/contivModelClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,13 @@ type NetworkLinks struct {
}

type NetworkOper struct {
AllocatedAddressesCount int `json:"allocatedAddressesCount,omitempty"` // Vlan/Vxlan Tag
AllocatedIPAddresses string `json:"allocatedIPAddresses,omitempty"` // allocated IP addresses
DnsServerIP string `json:"dnsServerIP,omitempty"` // dns IP for the network
ExternalPktTag int `json:"externalPktTag,omitempty"` // external packet tag
NumEndpoints int `json:"numEndpoints,omitempty"` // external packet tag
PktTag int `json:"pktTag,omitempty"` // internal packet tag
AllocatedAddressesCount int `json:"allocatedAddressesCount,omitempty"` // Vlan/Vxlan Tag
AllocatedIPAddresses string `json:"allocatedIPAddresses,omitempty"` // allocated IP addresses
DnsServerIP string `json:"dnsServerIP,omitempty"` // dns IP for the network
Endpoints []EndpointOper `json:"endpoints,omitempty"`
ExternalPktTag int `json:"externalPktTag,omitempty"` // external packet tag
NumEndpoints int `json:"numEndpoints,omitempty"` // external packet tag
PktTag int `json:"pktTag,omitempty"` // internal packet tag

}

Expand Down
13 changes: 7 additions & 6 deletions contivModel.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,13 @@ type NetworkLinks struct {
}

type NetworkOper struct {
AllocatedAddressesCount int `json:"allocatedAddressesCount,omitempty"` // Vlan/Vxlan Tag
AllocatedIPAddresses string `json:"allocatedIPAddresses,omitempty"` // allocated IP addresses
DnsServerIP string `json:"dnsServerIP,omitempty"` // dns IP for the network
ExternalPktTag int `json:"externalPktTag,omitempty"` // external packet tag
NumEndpoints int `json:"numEndpoints,omitempty"` // external packet tag
PktTag int `json:"pktTag,omitempty"` // internal packet tag
AllocatedAddressesCount int `json:"allocatedAddressesCount,omitempty"` // Vlan/Vxlan Tag
AllocatedIPAddresses string `json:"allocatedIPAddresses,omitempty"` // allocated IP addresses
DnsServerIP string `json:"dnsServerIP,omitempty"` // dns IP for the network
Endpoints []EndpointOper `json:"endpoints,omitempty"`
ExternalPktTag int `json:"externalPktTag,omitempty"` // external packet tag
NumEndpoints int `json:"numEndpoints,omitempty"` // external packet tag
PktTag int `json:"pktTag,omitempty"` // internal packet tag

}

Expand Down
5 changes: 5 additions & 0 deletions network.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
"dnsServerIP": {
"type": "string",
"title": "dns IP for the network"
},
"endpoints": {
"type": "array",
"items": "endpoint",
"title": "endpoints in the network"
}
},
"link-sets": {
Expand Down

0 comments on commit 30e5f84

Please sign in to comment.