Skip to content

Conversation

@neaggarwMS
Copy link
Member

Added implementation for CreateOrUpdateNetworkContainerInternal. This will be called by the CNS requestController and it will handle SecondaryIpConfigs update which will add state for new Secondary ips and delete the state for any delta.

@codecov
Copy link

codecov bot commented Jul 16, 2020

Codecov Report

Merging #617 into master will increase coverage by 0.26%.
The diff coverage is 67.52%.

@@            Coverage Diff             @@
##           master     #617      +/-   ##
==========================================
+ Coverage   42.23%   42.49%   +0.26%     
==========================================
  Files          72       72              
  Lines        9985     9993       +8     
==========================================
+ Hits         4217     4247      +30     
+ Misses       5316     5276      -40     
- Partials      452      470      +18     

@neaggarwMS neaggarwMS changed the title More changes Implement CreateOrUpdateNetworkContainerInternal API. Jul 16, 2020
@neaggarwMS neaggarwMS force-pushed the cns_addCreateNCAPIForSecondaryCA branch from 5b19439 to f4ebf1c Compare July 17, 2020 05:22
@neaggarwMS neaggarwMS marked this pull request as ready for review July 21, 2020 22:43
@neaggarwMS neaggarwMS force-pushed the cns_addCreateNCAPIForSecondaryCA branch from ccbafc8 to 0f99ae6 Compare July 21, 2020 23:55
@matmerr
Copy link
Member

matmerr commented Jul 22, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@neaggarwMS neaggarwMS force-pushed the cns_addCreateNCAPIForSecondaryCA branch from 710a137 to d3f0ce9 Compare July 22, 2020 21:29
@neaggarwMS
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

ramiro-gamarra
ramiro-gamarra previously approved these changes Jul 22, 2020
fmt.Printf("Failed to create CNS object %v\n", err)
os.Exit(1)
}
svc = service.(*HTTPRestService)
Copy link
Member

Choose a reason for hiding this comment

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

new svc object is being created on line 110

matmerr
matmerr previously approved these changes Jul 22, 2020
// nc := cns.CreateNetworkContainerRequest{
// SecondaryIPConfigs: ipconfigs,
// }
func addTestStateToRestServer(t *testing.T, secondaryIps []string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Can you declare vars at the beginning of the function in one block like this?
var (
ipConfig cns.IPConfiguration
ipSubnet cns.IPSubnet
...
)

I picked this up from Mat's code and I think it makes for cleaner functions

matmerr
matmerr previously approved these changes Jul 22, 2020
matmerr
matmerr previously approved these changes Jul 23, 2020
@neaggarwMS neaggarwMS force-pushed the cns_addCreateNCAPIForSecondaryCA branch from 67264cf to 2b8ec6f Compare July 23, 2020 03:35
@neaggarwMS neaggarwMS merged commit 5b437b1 into Azure:master Jul 23, 2020
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.

4 participants