diff --git a/snmp_setcomm_ee_vnf/cloud_init/vyos-userdata b/snmp_setcomm_ee_vnf/cloud_init/vyos-userdata index 6466aa9deea47c9d115ec2a8967d1a82ebd4cfc8..65a20db7d738af72bf6ce919f241c875319f5693 100644 --- a/snmp_setcomm_ee_vnf/cloud_init/vyos-userdata +++ b/snmp_setcomm_ee_vnf/cloud_init/vyos-userdata @@ -15,8 +15,7 @@ set service ssh listen-address 0.0.0.0 set service ssh port 22 set system login user osm authentication plaintext-password osm2020 # SNMP -set service snmp community public authorization ro set service snmp location "OSM Labs" # Save commit -save \ No newline at end of file +save diff --git a/snmp_setcomm_ee_vnf/helm-charts/eechart/snmp/generator.yml b/snmp_setcomm_ee_vnf/helm-charts/eechart/snmp/generator.yml index 18c862ce7e24173db3899c2a5b05651ceb1fb001..5e05b82966e28e5195c6092b07322d06552f6e4f 100644 --- a/snmp_setcomm_ee_vnf/helm-charts/eechart/snmp/generator.yml +++ b/snmp_setcomm_ee_vnf/helm-charts/eechart/snmp/generator.yml @@ -11,4 +11,4 @@ modules: lookup: 1.3.6.1.2.1.31.1.1.1.1 # ifName auth: # Community string is used with SNMP v1 and v2. Defaults to "public". - community: public + community: secret diff --git a/snmp_setcomm_ee_vnf/helm-charts/eechart/source/community.yaml b/snmp_setcomm_ee_vnf/helm-charts/eechart/source/community.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0d5d7061f7734a6f9fc1869cdac44bd92e596318 --- /dev/null +++ b/snmp_setcomm_ee_vnf/helm-charts/eechart/source/community.yaml @@ -0,0 +1,8 @@ +--- +- hosts: all + connection: local + tasks: + - name: change SNMP community + vyos_config: + lines: + - set service snmp community "{{ snmp_community }}" authorization ro diff --git a/snmp_setcomm_ee_vnf/helm-charts/eechart/source/touch.yaml b/snmp_setcomm_ee_vnf/helm-charts/eechart/source/touch.yaml deleted file mode 100644 index f427644fba5b1fe93b257d17d84f9193e9decf0a..0000000000000000000000000000000000000000 --- a/snmp_setcomm_ee_vnf/helm-charts/eechart/source/touch.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: This is a hello-world example - hosts: all - tasks: - - name: Create a file called '/tmp/testfile.txt' with the content 'hello world'. - copy: - content: hello worldn - dest: "{{ file_path }}" - - diff --git a/snmp_setcomm_ee_vnf/helm-charts/eechart/source/vnf_ee.py b/snmp_setcomm_ee_vnf/helm-charts/eechart/source/vnf_ee.py index 7c976e1f40c4b3acaaec99dee3de29d900446c6e..6b1f48057f10aa954d64c0d07f9d9cffb074456e 100755 --- a/snmp_setcomm_ee_vnf/helm-charts/eechart/source/vnf_ee.py +++ b/snmp_setcomm_ee_vnf/helm-charts/eechart/source/vnf_ee.py @@ -72,7 +72,7 @@ class VnfEE: self._check_required_params(params, ["playbook-name"]) params["ansible_user"] = self.config_params["ssh-username"] - #params["ansible_password"] = self.config_params["ssh-password"] + params["ansible_password"] = self.config_params["ssh-password"] inventory = self.config_params["ssh-hostname"] + "," diff --git a/snmp_setcomm_ee_vnf/snmp_setcomm_ee_vnfd.yaml b/snmp_setcomm_ee_vnf/snmp_setcomm_ee_vnfd.yaml index b3432ecd47c46b754e9a9eaf3e8bd97645292310..461b9067831a9b4332558ce0df8feaee0f68fcbf 100644 --- a/snmp_setcomm_ee_vnf/snmp_setcomm_ee_vnfd.yaml +++ b/snmp_setcomm_ee_vnf/snmp_setcomm_ee_vnfd.yaml @@ -48,10 +48,6 @@ vnfd-catalog: mgmt-interface: cp: vnf-mgmt vnf-configuration: - config-access: - ssh-access: - default-user: ubuntu - required: true execution-environment-list: - id: monitor helm-chart: eechart @@ -65,7 +61,9 @@ vnfd-catalog: - name: ssh-hostname value: - name: ssh-username - value: ubuntu + value: osm + - name: ssh-password + value: osm2020 - seq: 2 name: generate_snmp execution-environment-ref: monitor @@ -74,19 +72,16 @@ vnfd-catalog: execution-environment-ref: monitor parameter: - name: playbook-name - value: touch.yaml - - name: file_path - value: /var/tmp/test-touch.txt + value: community.yaml + - name: snmp_community + value: secret config-primitive: - name: generate_snmp execution-environment-ref: monitor - - name: touch + - name: ansible_playbook execution-environment-ref: monitor execution-environment-primitive: ansible_playbook parameter: - name: playbook-name - default-value: touch - data-type: STRING - - name: file-path - default-value: /var/tmp/test-touch2.txt + default-value: playbook.yaml data-type: STRING