
/Customers
or /<mainenity>?$expand=customer
endpoints.@CDS.persistence.exists
.namespace master.partners;
entity Vendors {
key ID: Integer;
name: String;
customer: Association to Customers
}
@cds.persistence.exists
entity Customers {
key ID: Integer;
name: String
}
resources:
- name: master-db
type: org.cloudfoundry.existing-service
parameters:
service-name: master-db
@CDS.persistence.exists
.namespace master.orgs;
entity Plants {
key ID: Integer;
name: String;
customer: Association to Customers
}
@cds.persistence.exists
entity Customers {
key ID: Integer;
name: String
}
{
"MASTER_ORGS_CUSTOMERS": {
"target": {
"object": "MASTER_PARTNERS_CUSTOMERS"
}
}
}
{
"role": {
"name": "MASTER_PARTNERS_EXTERNAL_ACCESS",
"object_privileges": [
{
"name":"MASTER_PARTNERS_CUSTOMERS",
"type":"TABLE",
"privileges":[ "SELECT" ],
"privileges_with_grant_option":[]
}
]
}
}
{
"role": {
"name": "MASTER_PARTNERS_EXTERNAL_ACCESS_G#",
"object_privileges": [
{
"name":"MASTER_PARTNERS_CUSTOMERS",
"type":"TABLE",
"privileges":[],
"privileges_with_grant_option":["SELECT"]
}
]
}
}
@CDS.persistence.exists
.namespace sales;
entity Orders {
key ID: Integer;
amount: Integer;
customer: Association to Customers;
}
@cds.persistence.exists
entity Customers {
key ID: Integer;
name: String;
}
{
"SALES_CUSTOMERS": {}
}
{
"SALES_CUSTOMERS": {
"target": {
"object": "MASTER_PARTNERS_CUSTOMERS",
"schema.configure": "master-db-hdi/schema"
}
}
}
{
"master-db-hdi": {
"object_owner": {
"container_roles": [
"MASTER_PARTNERS_EXTERNAL_ACCESS_G#"
]
},
"application_user": {
"container_roles": [
"MASTER_PARTNERS_EXTERNAL_ACCESS"
]
}
}
}
# --------------------- SERVER MODULE ------------------------
- name: sales-srv
# ------------------------------------------------------------
type: nodejs
path: gen/srv
parameters:
buildpack: nodejs_buildpack
requires:
# Resources extracted from CAP configuration
- name: sales-db
provides:
- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
# -------------------- SIDECAR MODULE ------------------------
- name: sales-db-deployer
# ------------------------------------------------------------
type: hdb
path: gen/db
parameters:
buildpack: nodejs_buildpack
requires:
# 'hana' and 'xsuaa' resources extracted from CAP configuration
- name: sales-db
properties:
TARGET_CONTAINER: ~{hdi-service-name}
- name: master-db
group: SERVICE_REPLACEMENTS
properties:
key: master-db-hdi
service: ~{master-db-hdi}
resources:
# services extracted from CAP configuration
# 'service-plan' can be configured via 'cds.requires.<name>.vcap.plan'
# ------------------------------------------------------------
- name: sales-db
# ------------------------------------------------------------
type: com.sap.xs.hdi-container
parameters:
service: hana # or 'hanatrial' on trial landscapes
service-plan: hdi-shared
properties:
hdi-service-name: ${service-name}
- name: master-db
type: org.cloudfoundry.existing-service
parameters:
service-name: master-db
properties:
master-db-hdi: ${service-name}
- name: master-db
group: SERVICE_REPLACEMENTS
properties:
key: master-db-hdi
service: ~{master-db-hdi}
cf create-service-key master-db grantor-key
cf service-key master-db grantor-key > grantor-key.json
{
"certificate": "-----BEGIN CERTIFICATE-----certificate-----END CERTIFICATE-----",
"database_id": "2f4af70e-8103-40fd-ab04-e0224a420803",
"driver": "com.sap.db.jdbc.Driver",
"hdi_password": "password",
"hdi_user": "8C0524334BA3449487CF430CCCF279F4_2CPDC6Q1YEW5CA32U4OXI923P_DT",
"host": "6f4ade47-353e-4a67-bbb0-431cba244981.hana.trial-eu10.hanacloud.ondemand.com",
"password": "password",
"port": "443",
"schema": "349472F3D2FB4B6BBBF430B47451A7B2",
"url": "jdbc:sap://6f4ade47-353e-4a67-bbb0-431cba244981.hana.trial-eu10.hanacloud.ondemand.com:443?encrypt=true\u0026validateCertificate=true\u0026currentschema=349472F3D2FB4B6BBBF430B47451A7B2",
"user": "8C0524334BA3449487CF430CCCF279F4_2CPDC6Q1YEW5CA32U4OXI923P_RT",
"tags": "hana"
}
cf create-user-provided-service ups-master-db -p grantor-key.json
@CDS.persistence.exists
namespace accounting;
entity Invoices {
key ID: Integer;
amount: Integer;
customer: Association to Customers;
}
@cds.persistence.exists
entity Customers {
key ID: Integer;
name: String;
}
{
"ACCOUNTING_CUSTOMERS": {}
}
{
"ACCOUNTING_CUSTOMERS": {
"target": {
"object": "MASTER_PARTNERS_CUSTOMERS",
"schema.configure": "cross-schema-ups/schema"
}
}
}
{
"cross-schema-ups": {
"object_owner": {
"container_roles": [
"MASTER_PARTNERS_EXTERNAL_ACCESS_G#"
]
},
"application_user": {
"container_roles": [
"MASTER_PARTNERS_EXTERNAL_ACCESS"
]
}
}
}
# --------------------- SERVER MODULE ------------------------
- name: accounting-srv
# ------------------------------------------------------------
type: nodejs
path: gen/srv
parameters:
buildpack: nodejs_buildpack
memory: 256M
disk-quota: 1024M
requires:
# Resources extracted from CAP configuration
- name: accounting-db
provides:
- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
# -------------------- SIDECAR MODULE ------------------------
- name: accounting-db-deployer
# ------------------------------------------------------------
type: hdb
path: gen/db
parameters:
buildpack: nodejs_buildpack
requires:
# 'hana' and 'xsuaa' resources extracted from CAP configuration
- name: accounting-db
properties:
TARGET_CONTAINER: ~{hdi-service-name}
- name: ups-master-db
group: SERVICE_REPLACEMENTS
properties:
key: cross-schema-ups
service: ~{cross-schema-ups}
resources:
# services extracted from CAP configuration
# 'service-plan' can be configured via 'cds.requires.<name>.vcap.plan'
# ------------------------------------------------------------
- name: accounting-db
# ------------------------------------------------------------
type: com.sap.xs.hdi-container
parameters:
service: hana # or 'hanatrial' on trial landscapes
service-plan: hdi-shared
properties:
hdi-service-name: ${service-name}
- name: ups-master-db
type: org.cloudfoundry.existing-service
parameters:
service-name: ups-master-db
properties:
cross-schema-ups: ${service-name}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
4 |