diff options
author | Ritu Sood <ritu.sood@intel.com> | 2020-08-29 01:27:53 -0700 |
---|---|---|
committer | Ritu Sood <ritu.sood@intel.com> | 2020-09-02 13:59:58 -0700 |
commit | d8ed6e76a40b8942c2b56c623dcc097d734e3dca (patch) | |
tree | fe5712061d02d1d971b84cbc2f2f7bca68666cfd /src/tools/emcoctl/examples | |
parent | d14246bb9a2c8874f9925c45322d678a93584adb (diff) |
Update CLI with complete get implementation
CLI updated with get functionality. Also adding
vFw test case
Issue-ID: MULTICLOUD-1065
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Change-Id: I7bd22aca9fac9cb7b1f4c93d0ffad5b07b62cced
Diffstat (limited to 'src/tools/emcoctl/examples')
-rw-r--r-- | src/tools/emcoctl/examples/emco-cfg.yaml | 8 | ||||
-rw-r--r-- | src/tools/emcoctl/examples/vfw.yaml | 408 |
2 files changed, 415 insertions, 1 deletions
diff --git a/src/tools/emcoctl/examples/emco-cfg.yaml b/src/tools/emcoctl/examples/emco-cfg.yaml index f2790654..c1703def 100644 --- a/src/tools/emcoctl/examples/emco-cfg.yaml +++ b/src/tools/emcoctl/examples/emco-cfg.yaml @@ -3,4 +3,10 @@ port: 9015 clm: host: localhost - port: 9061
\ No newline at end of file + port: 9061 + ncm: + host: localhost + port: 9031 + ovnaction: + host: localhost + port: 9051
\ No newline at end of file diff --git a/src/tools/emcoctl/examples/vfw.yaml b/src/tools/emcoctl/examples/vfw.yaml new file mode 100644 index 00000000..b5df4834 --- /dev/null +++ b/src/tools/emcoctl/examples/vfw.yaml @@ -0,0 +1,408 @@ +#creating controller entries +version: emco/v2 +resourceContext: + anchor: controllers +metadata : + name: rsync +spec: + host: "192.168.121.6" + port: 30546 +--- + +#creating controller entries +version: emco/v2 +resourceContext: + anchor: controllers +metadata : + name: ovnaction +spec: + host: "192.168.121.6" + port: 32259 + type: "action" + priority: 1 + +--- + +#creating cluster provider +version: emco/v2 +resourceContext: + anchor: cluster-providers +metadata : + name: vfw-cluster-provider + +--- +#creating cluster +version: emco/v2 +resourceContext: + anchor: cluster-providers/vfw-cluster-provider/clusters +metadata : + name: edge01 +file: + kubeconfig + +--- +#Add label cluster +version: emco/v2 +resourceContext: + anchor: cluster-providers/vfw-cluster-provider/clusters/edge01/labels +label-name: LabelA + +--- +version: emco/v2 +resourceContext: + anchor: cluster-providers/vfw-cluster-provider/clusters/edge01/networks +metadata: + name: emco-private-net +spec: + cniType: ovn4nfv + ipv4Subnets: + - subnet: 10.10.20.0/24 + name: subnet1 + gateway: 10.10.20.1/24 + +--- +version: emco/v2 +resourceContext: + anchor: cluster-providers/vfw-cluster-provider/clusters/edge01/networks +metadata: + name: emco-unprotected-net +spec: + cniType: ovn4nfv + ipv4Subnets: + - subnet: 192.168.10.0/24 + name: subnet1 + gateway: 192.168.10.1/24 + +--- +version: emco/v2 +resourceContext: + anchor: cluster-providers/vfw-cluster-provider/clusters/edge01/networks +metadata: + name: protected-private-net +spec: + cniType: ovn4nfv + ipv4Subnets: + - subnet: 192.168.20.0/24 + name: subnet1 + gateway: 192.168.20.1/24 + +--- +version: emco/v2 +resourceContext: + anchor: cluster-providers/vfw-cluster-provider/clusters/edge01/apply + +--- +#create project +version: emco/v2 +resourceContext: + anchor: projects +metadata : + name: testvfw + +--- +#creating collection composite app entry +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps +metadata : + name: compositevfw +spec: + version: v1 + +--- +#adding prometheus app to the composite app +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/apps +metadata : + name: packetgen +file: + /home/vagrant/multicloud-k8s/kud/demo/composite-firewall/packetgen.tar.gz + +--- +#adding prometheus app to the composite app +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/apps +metadata : + name: firewall +file: + /home/vagrant/multicloud-k8s/kud/demo/composite-firewall/firewall.tar.gz + +--- +#adding collectd app to the composite app +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/apps +metadata : + name: sink +file: + /home/vagrant/multicloud-k8s/kud/demo/composite-firewall/sink.tar.gz + +--- +#creating collection composite profile entry +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/composite-profiles +metadata : + name: vfw_composite-profile + +--- +#adding prometheus app profiles to the composite profile +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/composite-profiles/vfw_composite-profile/profiles +metadata : + name: packetgen-profile +spec: + app-name: packetgen +file: + /home/vagrant/multicloud-k8s/kud/demo/composite-firewall/profile.tar.gz + +--- +#adding firewall app profiles to the composite profile +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/composite-profiles/vfw_composite-profile/profiles +metadata : + name: firewall-profile +spec: + app-name: firewall +file: + /home/vagrant/multicloud-k8s/kud/demo/composite-firewall/profile.tar.gz + +--- +#adding firewall app profiles to the composite profile +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/composite-profiles/vfw_composite-profile/profiles +metadata : + name: sink-profile +spec: + app-name: sink +file: + /home/vagrant/multicloud-k8s/kud/demo/composite-firewall/profile.tar.gz + +--- +#create the generic placement intent +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/generic-placement-intents +metadata : + name: fw-placement-intent +spec: + logical-cloud: NA + +--- +#add the prometheus app placement intent to the generic placement intent +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/generic-placement-intents/fw-placement-intent/app-intents +metadata: + name: packetgen-placement-intent +spec: + app-name: packetgen + intent: + allOf: + - provider-name: vfw-cluster-provider + cluster-label-name: LabelA +--- +#add the prometheus app placement intent to the generic placement intent +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/generic-placement-intents/fw-placement-intent/app-intents +metadata: + name: firewall-placement-intent +spec: + app-name: firewall + intent: + allOf: + - provider-name: vfw-cluster-provider + cluster-label-name: LabelA + +--- +#add the prometheus app placement intent to the generic placement intent +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/generic-placement-intents/fw-placement-intent/app-intents +metadata: + name: sink-placement-intent +spec: + app-name: sink + intent: + allOf: + - provider-name: vfw-cluster-provider + cluster-label-name: LabelA + +--- +#creating cluster provider +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent +metadata : + name: vfw_ovnaction_intent + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents +metadata : + name: packetgen_workload_intent +spec: + application-name: packetgen + workload-resource: r1-packetgen + type: Deployment + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents +metadata : + name: firewall_workload_intent +spec: + application-name: firewall + workload-resource: r1-firewall + type: Deployment + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents +metadata : + name: sink_workload_intent +spec: + application-name: sink + workload-resource: r1-sink + type: Deployment + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents/packetgen_workload_intent/interfaces +metadata : + name: packetgen_unprotected_if +spec: + interface: eth1 + name: unprotected-private-net + defaultGateway: "false" + ipAddress: 192.168.10.2 + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents/packetgen_workload_intent/interfaces +metadata : + name: packetgen_emco_if +spec: + interface: eth2 + name: emco-private-net + defaultGateway: "false" + ipAddress: 10.10.20.2 + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents/firewall_workload_intent/interfaces +metadata : + name: firewall_emco_if +spec: + interface: eth3 + name: emco-private-net + defaultGateway: "false" + ipAddress: 10.10.20.3 + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents/firewall_workload_intent/interfaces +metadata : + name: firewall_unprotected_if +spec: + interface: eth1 + name: unprotected-private-net + defaultGateway: "false" + ipAddress: 192.168.10.3 + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents/firewall_workload_intent/interfaces +metadata : + name: firewall_protected_if +spec: + interface: eth2 + name: protected-private-net + defaultGateway: "false" + ipAddress: 192.168.20.2 + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents/sink_workload_intent/interfaces +metadata : + name: sink_protected_if +spec: + interface: eth1 + name: protected-private-net + defaultGateway: "false" + ipAddress: 192.168.20.3 + +--- +# +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/network-controller-intent/vfw_ovnaction_intent/workload-intents/sink_workload_intent/interfaces +metadata : + name: sink_emco_if +spec: + interface: eth2 + name: emco-private-net + defaultGateway: "false" + ipAddress: 10.10.20.4 + +--- +#create deployment intent group +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/deployment-intent-groups +metadata : + name: vfw_deployment_intent_group +spec: + profile: vfw_composite-profile + version: r1 + override-values: + - app-name: packetgen + values: + ".Values.service.ports.nodePort": '30888' + - app-name: firewall + values: + ".Values.global.dcaeCollectorIp": 1.2.3.4 + ".Values.global.dcaeCollectorPort": '8888' + - app-name: sink + values: + ".Values.service.ports.nodePort": '30677' + +--- +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/deployment-intent-groups/vfw_deployment_intent_group/intents +metadata : + name: fw-deployment-intent +spec: + intent: + genericPlacementIntent: fw-placement-intent + ovnaction: vfw_ovnaction_intent + +--- +version: emco/v2 +resourceContext: + anchor: projects/testvfw/composite-apps/compositevfw/v1/deployment-intent-groups/vfw_deployment_intent_group/approve |