Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0b3b93a
spelling: address
jsoref Nov 28, 2021
686fe48
spelling: already
jsoref Nov 28, 2021
0686be7
spelling: annotation
jsoref Nov 28, 2021
45a62d0
spelling: annotations
jsoref Nov 28, 2021
4ccfac0
spelling: assigned
jsoref Nov 28, 2021
81f59f3
spelling: associated
jsoref Nov 28, 2021
9be4806
spelling: assumption
jsoref Nov 28, 2021
70ef707
spelling: attribute
jsoref Nov 28, 2021
bec1855
spelling: available
jsoref Nov 28, 2021
05b6acf
spelling: class
jsoref Nov 28, 2021
8859b89
spelling: collector
jsoref Nov 28, 2021
6103a92
spelling: committed
jsoref Nov 28, 2021
4b035af
spelling: committers
jsoref Nov 28, 2021
b5524b4
spelling: defined
jsoref Nov 28, 2021
0a75d58
spelling: dependency
jsoref Nov 28, 2021
de27a1e
spelling: empty
jsoref Nov 28, 2021
64a9de0
spelling: existing
jsoref Nov 28, 2021
7d0247a
spelling: format
jsoref Nov 28, 2021
035f98e
spelling: forwarding
jsoref Nov 28, 2021
e6ad658
spelling: initializes
jsoref Nov 28, 2021
5bd884f
spelling: matching
jsoref Nov 28, 2021
bcf8042
spelling: metadata
jsoref Nov 28, 2021
9b4ef05
spelling: network
jsoref Nov 28, 2021
59387cb
spelling: neutron
jsoref Nov 28, 2021
9efbd90
spelling: overwritten
jsoref Nov 28, 2021
b0ca0d0
spelling: playbook
jsoref Nov 28, 2021
d33173c
spelling: policies
jsoref Nov 28, 2021
b15ab69
spelling: reference
jsoref Nov 28, 2021
f2882b9
spelling: referred
jsoref Nov 28, 2021
f1434ef
spelling: resources
jsoref Nov 28, 2021
33490b4
spelling: returns
jsoref Nov 28, 2021
a3fbb2b
spelling: router
jsoref Nov 28, 2021
b235f00
spelling: separated
jsoref Nov 28, 2021
b83d7ac
spelling: standards
jsoref Nov 28, 2021
4e48a25
spelling: transaction
jsoref Nov 28, 2021
a8b7c03
spelling: translation
jsoref Nov 28, 2021
0ca5e46
spelling: virtual
jsoref Nov 28, 2021
c17ec56
spelling: weightages
jsoref Nov 28, 2021
8abb634
spelling: without
jsoref Nov 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitreview
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# Please visit opencontrail.org additional information.
#
# e.g. After changes are complete and commited to a local branch, do
# e.g. After changes are complete and committed to a local branch, do
# 'git review' to submit changeset to review.opencontrail.org Code Review
# (gerrit) System.
#
Expand Down
2 changes: 1 addition & 1 deletion REVIEW.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Code review guidelines

This file contains guidelines for commiters and code reviewers.
This file contains guidelines for committers and code reviewers.
It is open for updates.

## References
Expand Down
2 changes: 1 addition & 1 deletion doc/rest_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ RESPONSE: {

## Sync API

Sync API support creating or deleting multiple resoruces in one time.
Sync API support creating or deleting multiple resources in one time.
This API tries to update resources if same resource with UUID has already exists.

POST
Expand Down
2 changes: 1 addition & 1 deletion doc/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Schema based validation is done in `ContrailService` which is the first one in the inner service chain.
Validation function for each resource is generated from [template file](tools/templates/contrail/type_validation.tmpl).
Each generated function may be overwriten or extended in [this file](pkg/models/validation.go).
Each generated function may be overwritten or extended in [this file](pkg/models/validation.go).

### Enums

Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/bench_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func BenchmarkVirtualNetworkCreate(b *testing.B) {
}

for i := 0; i < tt.numberOfExistingVNs; i++ {
vn.UUID = "test_exisiting_vn_uuid_" + strconv.Itoa(i)
vn.Name = "test_exisiting_vn_" + strconv.Itoa(i)
vn.UUID = "test_existing_vn_uuid_" + strconv.Itoa(i)
vn.Name = "test_existing_vn_" + strconv.Itoa(i)

if _, err := hc.CreateVirtualNetwork(ctx, &services.CreateVirtualNetworkRequest{VirtualNetwork: vn}); err != nil {
b.Fatal("Failed to create VN: ", err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/test_data/test_alarm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ workflow:
<<: *alarm_range_correct_without_uuid
uuid: test_valid_alarm

- name: update with emtpy rules
- name: update with empty rules
request:
path: /alarm/test_valid_alarm
method: PUT
Expand Down
6 changes: 3 additions & 3 deletions pkg/apiserver/test_data/test_firewall_policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ workflow:

- name: creating firewall policy with draft mode state property defined should fail
request:
path: /firewall-policys
path: /firewall-policies
Copy link
Author

Choose a reason for hiding this comment

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

I don't understand this, so I expect this isn't a correct change

method: POST
expected: [400]
data:
Expand All @@ -110,7 +110,7 @@ workflow:

- name: creating global firewall policy with scoped refs should fail
request:
path: /firewall-policys
path: /firewall-policies
method: POST
expected: [400]
data:
Expand All @@ -121,7 +121,7 @@ workflow:

- name: create firewall policy
request:
path: /firewall-policys
path: /firewall-policies
method: POST
expected: [200]
data:
Expand Down
8 changes: 4 additions & 4 deletions pkg/apiserver/test_data/test_forwarding_class.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ workflow:

- name: create forwarding class
request:
path: /forwarding-classs
path: /forwarding-class
Copy link
Author

Choose a reason for hiding this comment

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

ditto

method: POST
expected:
- 200
Expand All @@ -101,7 +101,7 @@ workflow:

- name: try to create forwarding class with already used id
request:
path: /forwarding-classs
path: /forwarding-class
method: POST
expected:
- 400
Expand All @@ -114,7 +114,7 @@ workflow:

- name: create second forwarding class
request:
path: /forwarding-classs
path: /forwarding-class
method: POST
expected:
- 200
Expand Down Expand Up @@ -159,7 +159,7 @@ workflow:

- name: create forwarding class demo
request:
path: /forwarding-classs
path: /forwarding-class
method: POST
expected:
- 200
Expand Down
10 changes: 5 additions & 5 deletions pkg/apiserver/test_data/test_network_policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ workflow:

- name: create network policy with security group entries
request:
path: /network-policys
path: /network-policies
Copy link
Author

Choose a reason for hiding this comment

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

ditto

method: POST
expected:
- 400
Expand All @@ -124,7 +124,7 @@ workflow:

- name: create network policy with two the same rules
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 409
Expand All @@ -134,7 +134,7 @@ workflow:

- name: create network policy with invalid protocol number
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 400
Expand All @@ -144,7 +144,7 @@ workflow:

- name: create network policy with invalid protocol
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 400
Expand All @@ -154,7 +154,7 @@ workflow:

- name: create valid network policy and check if rule uuid is filled
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 200
Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/test_data/test_provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ workflow:
endpoint_2:
tag_ids:
- 0x00ff0002
# TODO uncomment when tag refs definied
# TODO uncomment when tag refs defined
# tag_refs:
# - uuid: tag_test_provisioning_uuid
# to:
# - namespace=default

- name: create firewall policy
request:
path: /firewall-policys
path: /firewall-policies
method: POST
expected: [200]
data:
Expand Down
8 changes: 4 additions & 4 deletions pkg/apiserver/test_data/test_quota_checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ workflow:
virtual-network: *spocknet_blue2
expect: null

- name: Re-verify virtal_network blue2 is not created
- name: Re-verify virtual_network blue2 is not created
request:
path: /virtual-network/uuid_vn_blue_spock2
method: GET
Expand Down Expand Up @@ -805,7 +805,7 @@ workflow:

- name: Create network_policy blue 1
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 200
Expand All @@ -829,7 +829,7 @@ workflow:

- name: Create network_policy blue 2
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 400
Expand Down Expand Up @@ -861,7 +861,7 @@ workflow:

- name: Create network_policy blue 2 (again)
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 200
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/test_data/test_ref_relax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ workflow:
project: *admin_project
- name: create network policy
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 200
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/test_data/test_ref_relax_invalid_input.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ workflow:
project: *admin_project
- name: create network policy
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 200
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/test_data/test_security_group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ workflow:
data:
security-group: *security_group_with_no_local
expect: null
- name: try to create security group with non mathing ethertype
- name: try to create security group with non matching ethertype
request:
path: /security-groups
method: POST
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/test_data/test_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cleanup:
- path: /tag-type/tag_type_uuid
- path: /tag/tag_minimal_correct_uuid
- path: /tag/tag_full_correct_uuid
- path: /tag/tag_wihout_tagtype_uuid
- path: /tag/tag_without_tagtype_uuid

test_data:
# SetUp data
Expand Down
8 changes: 4 additions & 4 deletions pkg/apiserver/test_data/test_virtual_machine_interface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ workflow:
expect:
virtual-network: *vn_vmi_blue

- name: create virtual router in the blue virutal network
- name: create virtual router in the blue virtual network
request:
path: /virtual-routers
method: POST
Expand Down Expand Up @@ -282,7 +282,7 @@ workflow:
virtual-machine-interface:
virtual_machine_refs:
- to: ["default-domain", "admin_vmi_project", "non-existing-vm"]
uuid: uuid-non-exisitng-vm-uuid
uuid: uuid-non-existing-vm-uuid
expect:
message:
$contains: "VirtualMachineRefs create failed"
Expand Down Expand Up @@ -412,7 +412,7 @@ workflow:
virtual_machine_refs: $null

# Tests of Delete operation
- name: create virtual machine interface with vrouter linked by bidings and with asssigned virtual machine
- name: create virtual machine interface with vrouter linked by bidings and with assigned virtual machine
request:
path: /virtual-machine-interfaces
method: POST
Expand All @@ -431,7 +431,7 @@ workflow:
- to: ["default-domain", "admin_vmi_project", "default-vm"]
uuid: default-vm-uuid

- name: try to delete VMI with assined VRouter and VM
- name: try to delete VMI with assigned VRouter and VM
request:
path: /virtual-machine-interface/171b8975-9784-4cc7-aa79-6e5efb672221
method: DELETE
Expand Down
18 changes: 9 additions & 9 deletions pkg/apiserver/test_data/test_virtual_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test_data:
simple_action: pass
admin_project_with_network_policy1: &admin_project_with_network_policy1
<<: *admin_project
network_policys:
network_policies:
Copy link
Author

Choose a reason for hiding this comment

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

ditto

- <<: *network_policy1
network_policy2: &network_policy2
fq_name: ["default", "5038dd12-9bf1-11e9-95a1-df91d98ff557", "policy2"]
Expand Down Expand Up @@ -196,7 +196,7 @@ workflow:
project: *demo_project
- name: create network policy 1
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 200
Expand All @@ -215,7 +215,7 @@ workflow:
- name: create network policy 2
client: bob
request:
path: /network-policys
path: /network-policies
method: POST
expected:
- 200
Expand Down Expand Up @@ -590,32 +590,32 @@ workflow:
- name: list network policy
request:
# TODO: parent_id is temporary fix as tests in gen_db_test.go are not cleaning database.
path: /network-policys?parent_id=47dd9220-9bf1-11e9-b422-538349e2da80
path: /network-policies?parent_id=47dd9220-9bf1-11e9-b422-538349e2da80
Copy link
Author

Choose a reason for hiding this comment

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

ditto

method: GET
expected:
- 200
expect:
network-policys:
network-policies:
- *network_policy1
- name: list network policy by user bob
client: bob
request:
path: /network-policys
path: /network-policies
method: GET
expected:
- 200
expect:
network-policys:
network-policies:
- *network_policy2
- name: count network policies
request:
# TODO: parent_id is temporary fix as tests in gen_db_test.go are not cleaning database.
path: "/network-policys?parent_id=47dd9220-9bf1-11e9-b422-538349e2da80&count=true"
path: "/network-policies?parent_id=47dd9220-9bf1-11e9-b422-538349e2da80&count=true"
method: GET
expected:
- 200
expect:
network-policys:
network-policies:
count: 1

- name: update vn_blue with user-defined subnet
Expand Down
6 changes: 3 additions & 3 deletions pkg/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ type dependencyTestAssertion func(
cache *DB,
)

type dependecyTestScenario struct {
type dependencyTestScenario struct {
Copy link
Author

Choose a reason for hiding this comment

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

As this is a test file, I expect this is probably ok

name string
event *services.Event
assertion dependencyTestAssertion
Expand Down Expand Up @@ -173,7 +173,7 @@ func TestDependencyResolution(t *testing.T) {
}

// All the steps must be run in proper order
tests := []dependecyTestScenario{
tests := []dependencyTestScenario{
{
name: "Create vn_blue",
event: &services.Event{
Expand Down Expand Up @@ -340,7 +340,7 @@ func TestReadInterfaceAndMaxHistory(t *testing.T) {
}

// All the steps must be run in proper order
tests := []dependecyTestScenario{
tests := []dependencyTestScenario{
{
name: "Create vn_blue",
event: &services.Event{
Expand Down
2 changes: 1 addition & 1 deletion pkg/collector/analytics/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
defaultTimeout = 30 * time.Second
)

// Config represents parameters of Сollector in the config file
Copy link
Author

Choose a reason for hiding this comment

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

The C here is not Latin.

// Config represents parameters of Collector in the config file
type Config struct {
Enabled bool
URL string
Expand Down
2 changes: 1 addition & 1 deletion pkg/compilation/watch/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type JobRequest struct {
// JobQueue : All jobs get queued here
var JobQueue chan JobRequest

// WatcherInit intializes the Watcher
// WatcherInit initializes the Watcher
func WatcherInit(numJobs int) {
// Initialize the Job-Q with configured number of Jobs permitted
JobQueue = make(chan JobRequest, numJobs)
Expand Down
Loading