Skip to content

Commit

Permalink
Merge pull request #1272 from ODIM-Project/development_replica
Browse files Browse the repository at this point in the history
Merging development replica branch to development
  • Loading branch information
jeevan-kamkar authored Jul 10, 2023
2 parents 89a614f + 514c35b commit 9e2317f
Show file tree
Hide file tree
Showing 88 changed files with 1,474 additions and 3,567 deletions.
2 changes: 1 addition & 1 deletion build/Redis/Dockerfile.redis
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#License for the specific language governing permissions and limitations
# under the License.
FROM redis:7.0.8
FROM redis:7.0.11

COPY Redis/start2db.sh /usr/local/bin/
COPY Redis/createschema.sh /usr/local/bin/
Expand Down
4 changes: 3 additions & 1 deletion build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.od

# third party docker images
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.etcd -t etcd:1.16 ." "etcd"
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.redis -t redis:4.0 ." "redis"

eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.redis -t redis:5.0 ." "redis"
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.kafka -t kafka:3.0 ." "kafka"
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.zookeeper -t zookeeper:3.0 ." "zookeeper"


# ODIMRA services image
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.accountSession -t account-session:4.0 ." "account session"
eval_cmd_exec "/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.aggregation -t aggregation:5.1 ". "aggregation"
Expand Down
2 changes: 1 addition & 1 deletion docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ declare -A images_list=(\
["fabrics"]="4.1" \
["kafka"]="3.0" \
["managers"]="6.0" \
["redis"]="4.0" \
["redis"]="5.0" \
["systems"]="6.0" \
["task"]="5.0" \
["telemetry"]="3.1"\
Expand Down
2 changes: 1 addition & 1 deletion install/Docker/dockerfiles/Dockerfile.redis
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#License for the specific language governing permissions and limitations
# under the License.

FROM redis:7.0.8
FROM redis:7.0.11

ARG ODIMRA_USER_ID
ARG ODIMRA_GROUP_ID
Expand Down
4 changes: 2 additions & 2 deletions lib-dmtf/model/accountService.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ type ExternalAccountProvider struct {
LDAPService *LDAPService `json:"LDAPService,omitempty"`
OAuth2Service *OAuth2Service `json:"OAuth2Service,omitempty"`
PasswordSet bool `json:"PasswordSet,omitempty"`
Priority int `json:"Priority"`
RemoteRoleMapping *RoleMapping `json:"RemoteRoleMapping"`
Priority int `json:"Priority,omitempty"`
RemoteRoleMapping []*RoleMapping `json:"RemoteRoleMapping,omitempty"`
ServiceAddresses []string `json:"ServiceAddresses,omitempty"`
ServiceEnabled bool `json:"ServiceEnabled,omitempty"`
TACACSplusService *TACACSplusService `json:"TACACSplusService,omitempty"`
Expand Down
12 changes: 6 additions & 6 deletions lib-dmtf/model/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package model

//Port is the redfish Port model according to the 2020.3 release
// Port is the redfish Port model according to the 2020.3 release
type Port struct {
ODataContext string `json:"@odata.context,omitempty"`
ODataEtag string `json:"@odata.etag,omitempty"`
Expand Down Expand Up @@ -113,7 +113,7 @@ type FunctionBandwidth struct {
NetworkDeviceFunction *Link `json:"NetworkDeviceFunctions,omitempty"`
}

//PortEthernet redfish model
// PortEthernet redfish model
type PortEthernet struct {
FlowControlConfiguration string `json:"FlowControlConfiguration,omitempty"`
FlowControlStatus string `json:"FlowControlStatus,omitempty"`
Expand Down Expand Up @@ -141,29 +141,29 @@ type LLDP struct {
SystemName string `json:"SystemName,omitempty"`
}

//FibreChannel redfish model
// FibreChannel redfish model
type FibreChannel struct {
FabricName string `json:"FabricName,omitempty"`
NumberDiscoveredRemotePorts int `json:"NumberDiscoveredRemotePorts,omitempty"`
PortConnectionType string `json:"PortConnectionType,omitempty"`
AssociatedWorldWideNames []string `json:"AssociatedWorldWideNames,omitempty"`
}

//LinkConfiguration redfish model
// LinkConfiguration redfish model
type LinkConfiguration struct {
AutoSpeedNegotiationCapable bool `json:"AutoSpeedNegotiationCapable,omitempty"`
AutoSpeedNegotiationEnabled bool `json:"AutoSpeedNegotiationEnabled,omitempty"`
CapableLinkSpeedGbps []int `json:"CapableLinkSpeedGbps,omitempty"`
ConfiguredNetworkLinks []CapableLinkSpeedGbps `json:"ConfiguredNetworkLinks,omitempty"`
}

//CapableLinkSpeedGbps redfish model
// CapableLinkSpeedGbps redfish model
type CapableLinkSpeedGbps struct {
ConfiguredLinkSpeedGbps float64 `json:"ConfiguredLinkSpeedGbps,omitempty"`
ConfiguredWidth int `json:"ConfiguredWidth,omitempty"`
}

//PortLinks Port link redfish model
// PortLinks Port link redfish model
type PortLinks struct {
AssociatedEndpoints []Link `json:"AssociatedEndpoints,omitempty"`
ConnectedPorts []Link `json:"ConnectedPorts,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions lib-utilities/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ const (
AggregationSourceType = "#AggregationSource.v1_2_0.AggregationSource"
//ChassisType has version to be returned with Chassis Service
ChassisType = "#Chassis.v1_20_0.Chassis"
//ManagerAccountServiceType has version to be returned with RemoteAccountService response
ManagerAccountServiceType = "#AccountService.v1_13_0.AccountService"
// AggregateSubscriptionIndex is a index name which required for indexing
// subscription of aggregate
AggregateSubscriptionIndex = "AggregateToHost"
Expand Down
18 changes: 9 additions & 9 deletions lib-utilities/common/crypto_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
// (C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//Licensed under the Apache License, Version 2.0 (the "License"); you may
//not use this file except in compliance with the License. You may obtain
//a copy of the License at
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
//License for the specific language governing permissions and limitations
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
package common

Expand Down
18 changes: 9 additions & 9 deletions lib-utilities/common/dbconn_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
// (C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//Licensed under the Apache License, Version 2.0 (the "License"); you may
//not use this file except in compliance with the License. You may obtain
//a copy of the License at
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
//License for the specific language governing permissions and limitations
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
package common

Expand Down
18 changes: 9 additions & 9 deletions lib-utilities/common/jobqueue_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
// (C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//Licensed under the Apache License, Version 2.0 (the "License"); you may
//not use this file except in compliance with the License. You may obtain
//a copy of the License at
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
//License for the specific language governing permissions and limitations
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
package common

Expand Down
18 changes: 9 additions & 9 deletions lib-utilities/common/mockconfig_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
// (C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//Licensed under the Apache License, Version 2.0 (the "License"); you may
//not use this file except in compliance with the License. You may obtain
//a copy of the License at
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
//License for the specific language governing permissions and limitations
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
package common

Expand Down
28 changes: 28 additions & 0 deletions lib-utilities/common/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"context"
"net/http"

"github.com/ODIM-Project/ODIM/lib-utilities/response"
iris "github.com/kataras/iris/v12"
"google.golang.org/grpc/metadata"
)
Expand Down Expand Up @@ -118,3 +119,30 @@ func CreateContext(transactionID, actionID, actionName, threadID, threadName, pr
ctx = context.WithValue(ctx, ProcessName, processName)
return ctx
}

// SendInvalidSessionResponse writes the response to client when no valid session is found
func SendInvalidSessionResponse(ctx iris.Context, errorMessage string) {
response := GeneralError(http.StatusUnauthorized, response.NoValidSession, errorMessage, nil, nil)
SetResponseHeader(ctx, response.Header)
ctx.StatusCode(http.StatusUnauthorized)
ctx.JSON(&response.Body)
return
}

// SendFailedRPCCallResponse writes the response to client when a RPC call fails
func SendFailedRPCCallResponse(ctx iris.Context, errorMessage string) {
response := GeneralError(http.StatusInternalServerError, response.InternalError, errorMessage, nil, nil)
SetResponseHeader(ctx, response.Header)
ctx.StatusCode(http.StatusInternalServerError)
ctx.JSON(&response.Body)
return
}

// SendMalformedJSONRequestErrResponse writes the response to client when the request contains malformed JSON structure
func SendMalformedJSONRequestErrResponse(ctx iris.Context, errorMessage string) {
response := GeneralError(http.StatusBadRequest, response.MalformedJSON, errorMessage, nil, nil)
SetResponseHeader(ctx, response.Header)
ctx.StatusCode(http.StatusBadRequest)
ctx.JSON(&response.Body)
return
}
18 changes: 9 additions & 9 deletions lib-utilities/common/workerpool_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
// (C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//Licensed under the Apache License, Version 2.0 (the "License"); you may
//not use this file except in compliance with the License. You may obtain
//a copy of the License at
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
//License for the specific language governing permissions and limitations
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
package common

Expand Down
18 changes: 9 additions & 9 deletions lib-utilities/config/mockconfig_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
// (C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//Licensed under the Apache License, Version 2.0 (the "License"); you may
//not use this file except in compliance with the License. You may obtain
//a copy of the License at
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
//License for the specific language governing permissions and limitations
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
// package ...
package config
Expand Down
6 changes: 3 additions & 3 deletions lib-utilities/errors/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ import (
"net/http"
)

//CommonError struct definition
// CommonError struct definition
type CommonError struct {
Error ErrorClass `json:"error"`
}

//ErrorClass struct definition
// ErrorClass struct definition
type ErrorClass struct {
Code string `json:"code"`
Message string `json:"message"`
MessageExtendedInfo []MsgExtendedInfo `json:"@Message.ExtendedInfo,omitempty"`
}

//MsgExtendedInfo struct definition
// MsgExtendedInfo struct definition
type MsgExtendedInfo struct {
OdataType string `json:"@odata.type,omitempty"`
MessageID string `json:"MessageId,omitempty"`
Expand Down
18 changes: 9 additions & 9 deletions lib-utilities/errors/error_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
// (C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//Licensed under the Apache License, Version 2.0 (the "License"); you may
//not use this file except in compliance with the License. You may obtain
//a copy of the License at
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
//License for the specific language governing permissions and limitations
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
package errors

Expand Down
18 changes: 9 additions & 9 deletions lib-utilities/response/errorresponse_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
// (C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//Licensed under the Apache License, Version 2.0 (the "License"); you may
//not use this file except in compliance with the License. You may obtain
//a copy of the License at
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
//License for the specific language governing permissions and limitations
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
package response

Expand Down
18 changes: 9 additions & 9 deletions lib-utilities/response/successresponse_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//(C) Copyright [2020] Hewlett Packard Enterprise Development LP
// (C) Copyright [2020] Hewlett Packard Enterprise Development LP
//
//Licensed under the Apache License, Version 2.0 (the "License"); you may
//not use this file except in compliance with the License. You may obtain
//a copy of the License at
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
//License for the specific language governing permissions and limitations
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
package response

Expand Down
Loading

0 comments on commit 9e2317f

Please sign in to comment.