Commit 76ba68af authored by Stavros-Anastasios Charismiadis's avatar Stavros-Anastasios Charismiadis
Browse files

Merge branch 'staging' into OCF82-implementation-of-rnaa-feature on 22/11/24

parents 06818a4b c8c610a5
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
- [Common API Framework (CAPIF)](#common-api-framework-capif)
- [CAPIF\_API\_Services](#capif_api_services)
- [Documentation](#documentation)
- [Install and Run](#install-and-run)
  - [How to run CAPIF services in this Repository](#how-to-run-capif-services-in-this-repository)
    - [Run All CAPIF Services locally with Docker images](#run-all-capif-services-locally-with-docker-images)
    - [Run All CAPIF Services locally with Docker images and deploy monitoring stack](#run-all-capif-services-locally-with-docker-images-and-deploy-monitoring-stack)
@@ -25,20 +26,6 @@ Please refer to [OCF Documentation] for more detailed information.


# Install and Run 
### (to be added in Getting Started section of Documentation)
```
mkdir OpenCAPIF

cd OpenCAPIF

# The link must be changed when finally merged with the default branch and be permanent
wget https://labs.etsi.org/rep/ocf/capif/-/raw/OCF19-local-installation-of-capif-downloading-script/deploy.sh

chmod +x deploy.sh

# ./deploy.sh [branch to fetch] [true or false (default) to install monitoring stack or not]
./deploy.sh staging
```

## How to run CAPIF services in this Repository
Capif services are developed under /service/ folder.
@@ -172,4 +159,3 @@ Frequently asked questions can be found here: [FAQ Directory]
[Testing with Robot Framework]: ./docs/testing_with_robot/README.md  "Testing with Robot Framework"
[FAQ Directory]: https://ocf.etsi.org/documentation/latest/FAQ/ "FAQ Url"
[OCF Documentation]: https://ocf.etsi.org/documentation/latest/ "OCF Documentation"
+2 −0
Original line number Diff line number Diff line
@@ -123,6 +123,8 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART
--set mock-server.ingress.hosts[0].paths[0].path="/" \
--set mock-server.ingress.hosts[0].paths[0].pathType="Prefix" \
--set mock-server.env.logLevel="DEBUG" \
--set mock-server.service.port=$MOCK_SERVER_PORT \
--set mock-server.livenessProbe.tcpSocket.port=$MOCK_SERVER_PORT \
--set mongo-register.persistence.storageClass=$CAPIF_STORAGE_CLASS \
--set mongo-register.persistence.storage=$CAPIF_MONGO_REGISTER_STORAGE_SIZE \
--set mongo-register.extraFlags[0]="--repair" \
+2 −0
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ export PROMETHEUS_URL="http://$MONITORING_SERVICE_NAME-prometheus.$MONITORING_NA
export VAULT_INTERNAL_HOSTNAME="$VAULT_SERVICE_NAME.$VAULT_NAMESPACE.svc.cluster.local"
export VAULT_PORT="8200"
export VAULT_ACCESS_TOKEN="dev-only-token"
## Only for testing purpouses, configuration of mock-server port
export MOCK_SERVER_PORT="9100"

######### POST PROCESSING VARIABLES SET ########
### To deploy in other environment we need to setup urls according to it and also using specific kubeconfig:
+3 −3
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ class InvokerManagementOperations(Resource):

        if res.status_code == 201:
            current_app.logger.info("Invoker Created")
            RedisEvent("API_INVOKER_ONBOARDED", "apiInvokerIds", [str(api_invoker_id)]).send_event()
            RedisEvent("API_INVOKER_ONBOARDED", ["apiInvokerIds"], [[str(api_invoker_id)]]).send_event()
        return res

    def update_apiinvokerenrolmentdetail(self, onboard_id, apiinvokerenrolmentdetail):
@@ -133,7 +133,7 @@ class InvokerManagementOperations(Resource):
            res = make_response(object=serialize_clean_camel_case(invoker_updated), status=200)
            if res.status_code == 200:
                current_app.logger.info("Invoker Updated")
                RedisEvent("API_INVOKER_UPDATED", "apiInvokerIds", [onboard_id]).send_event()
                RedisEvent("API_INVOKER_UPDATED", ["apiInvokerIds"], [[onboard_id]]).send_event()
            return res

        except Exception as e:
@@ -160,7 +160,7 @@ class InvokerManagementOperations(Resource):
            res = make_response(out, status=204)
            if res.status_code == 204:
                current_app.logger.info("Invoker Removed")
                RedisEvent("API_INVOKER_OFFBOARDED", "apiInvokerIds", [onboard_id]).send_event()
                RedisEvent("API_INVOKER_OFFBOARDED", ["apiInvokerIds"], [[onboard_id]]).send_event()
                publisher_ops.publish_message("internal-messages", f"invoker-removed:{onboard_id}")
            return res

+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ class InternalServiceOps(Resource):
                "apiInvokerPolicies": inserted_service_acls_camel['apiInvokerPolicies']
            }
            RedisEvent("ACCESS_CONTROL_POLICY_UPDATE",
                       "accCtrlPolList", accCtrlPolListExt).send_event()
                       ["accCtrlPolList"], [accCtrlPolListExt]).send_event()

        current_app.logger.info(
            f"Invoker ACL added for invoker: {invoker_id} for service: {service_id}")
Loading