Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

[DPM/ACA Schema] Add message_type and Update Router & SG Configuration #362

Merged
merged 11 commits into from
Sep 8, 2020

Conversation

er1cthe0ne
Copy link
Contributor

@er1cthe0ne er1cthe0ne commented Aug 25, 2020

This DPM/ACA Schema update includes the following:

  1. Added message_type for all configurations - DELTA (default) or FULL
  2. Moved the MessageType enum from port.proto to common.proto, addressed the corresponding break in DPM
  3. Updated SecurityGroupRule to include operation_type
  4. Added RoutingRule in router.proto and include operation_type
  5. Added PushNetworkResourceStatesStream to GoalStateProvisioner service definition
  6. Added router E2E workflow

@er1cthe0ne er1cthe0ne self-assigned this Aug 25, 2020
@er1cthe0ne er1cthe0ne added the contract new or modified service interfaces label Aug 25, 2020
string ipv4_address = 6;
string ipv6_address = 7;
string port_host_name = 8; // for local DNS response
MessageType message_type = 4; // DELTA (default) or FULL
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we differentiate message_type for DHCP, or everything is FULL for DHCP?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see two possible usage of message_type for DHCP:

  1. To update the repeated extra_dhcp_options or dns_entry_list in the future
  2. When the DHCP resource is out of order/error, it will look for a FULL message_type to reset

We may go with everything FULL approach for DHCP, but it will have less flexability and not consistant with other resource types.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good thought and thank you.

Copy link
Contributor

Choose a reason for hiding this comment

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

we need PM to provide the api then

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DHCP configuration is generated by DPM, if additional information is needed PM should provide it based on the contract between DPM<-> PM.

Copy link
Contributor

Choose a reason for hiding this comment

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

@chenpiaoping what do you think about "PM should provide it based on the contract between DPM<-> PM"

@@ -23,16 +23,17 @@ option java_outer_classname = "Vpc";

import "common.proto";

message VpcConfiguration {
message VpcConfiguration { // are we ready to remove VpcState based on the current router discussion?
Copy link
Contributor

Choose a reason for hiding this comment

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

Is VpcConfiguration in any case used for info purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not during our discussion so far including current router design

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, I could bear with it for some more time unless we complete the design for all major features. It is up to you though :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will change the comment to below so that we can bear with it for now :)

// Not used based on the current design including router E2E
// To be removed once we complete the design for all major features
message VpcConfiguration {

Copy link
Contributor

Choose a reason for hiding this comment

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

when would you remove it @er1cthe0ne

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be removed once we complete the design for all major features, on top of my head, that would include SG, EIP, SNAT.

@xieus xieus self-requested a review August 25, 2020 22:41
@xieus
Copy link
Contributor

xieus commented Aug 25, 2020

@er1cthe0ne Approved the change. As this could be a breaking change as expected, maybe we could merge to master after this week's release, or you urgently need this merge?

@er1cthe0ne
Copy link
Contributor Author

@er1cthe0ne Approved the change. As this could be a breaking change as expected, maybe we could merge to master after this week's release, or you urgently need this merge?

Agreed, we can merge it after this week's release. I am not blocked on my GRPC streaming implementation/test since I can use local change.

@codecov-commenter
Copy link

Codecov Report

Merging #362 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #362      +/-   ##
============================================
+ Coverage     33.98%   34.03%   +0.04%     
- Complexity      860      887      +27     
============================================
  Files           354      367      +13     
  Lines          8907     9165     +258     
  Branches       1081     1127      +46     
============================================
+ Hits           3027     3119      +92     
- Misses         5476     5652     +176     
+ Partials        404      394      -10     
Impacted Files Coverage Δ Complexity Δ
...urewei/alcor/dataplane/utils/GoalStateManager.java 91.76% <100.00%> (+0.44%) 29.00 <0.00> (ø)
...ewei/alcor/subnet/controller/SubnetController.java 66.51% <0.00%> (-5.28%) 20.00% <0.00%> (ø%)
...i/alcor/portmanager/controller/PortController.java 73.33% <0.00%> (-2.53%) 8.00% <0.00%> (ø%)
...asticipmanager/controller/ElasticIpController.java 54.16% <0.00%> (-1.16%) 10.00% <0.00%> (ø%)
...anager/service/implement/ElasticIpServiceImpl.java 63.44% <0.00%> (-1.10%) 27.00% <0.00%> (-1.00%)
...rewei/alcor/macmanager/dao/MacRangeRepository.java 15.78% <0.00%> (-0.88%) 3.00% <0.00%> (ø%)
...wei/alcor/vpcmanager/controller/VpcController.java 45.39% <0.00%> (-0.45%) 9.00% <0.00%> (ø%)
...alcor/elasticipmanager/dao/ElasticIpAllocator.java 63.53% <0.00%> (-0.28%) 48.00% <0.00%> (ø%)
...ygroup/controller/SecurityGroupRuleController.java 3.70% <0.00%> (-0.15%) 1.00% <0.00%> (ø%)
...rewei/alcor/vpcmanager/dao/GreRangeRepository.java 7.79% <0.00%> (-0.11%) 2.00% <0.00%> (ø%)
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95d478a...ecd7d57. Read the comment docs.

@er1cthe0ne er1cthe0ne merged commit afb357c into futurewei-cloud:master Sep 8, 2020
@er1cthe0ne er1cthe0ne changed the title [DPM/ACA Schema] added message_type and updated router and security group configuration - not for 830 release [DPM/ACA Schema] added message_type and updated router and security group configuration -post 830 release Sep 8, 2020
@xieus xieus changed the title [DPM/ACA Schema] added message_type and updated router and security group configuration -post 830 release [DPM/ACA Schema] Add message_type and Update Router & SG Configuration Sep 8, 2020
@er1cthe0ne er1cthe0ne deleted the security_group branch September 8, 2020 18:37
xieus pushed a commit that referenced this pull request Sep 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contract new or modified service interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants