aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java15
-rw-r--r--sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_3_create_audit_template.rb7
-rw-r--r--sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/recipes/setup_kibana.rb2
-rw-r--r--sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/templates/default/kibana.yml.erb2
-rw-r--r--sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/sdc-sanity.yaml.erb1
5 files changed, 22 insertions, 5 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
index f1dd1539b4..1625b50bae 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
@@ -590,17 +590,26 @@ public abstract class AbstractValidationsServlet extends BeGenericServlet {
validateToscaTemplatePayloadName(responseWrapper, uploadResourceInfoWrapper.getInnerElement(), userWrapper.getInnerElement());
}
if (responseWrapper.isEmpty()) {
- validateResourceType(responseWrapper, uploadResourceInfoWrapper.getInnerElement(), userWrapper.getInnerElement());
+ validateResourceType(responseWrapper, uploadResourceInfoWrapper.getInnerElement(), userWrapper.getInnerElement(), resourceAuthorityEnum);
}
}
- private void validateResourceType(Wrapper<Response> responseWrapper, UploadResourceInfo uploadResourceInfo, User user) {
+ private void validateResourceType(Wrapper<Response> responseWrapper, UploadResourceInfo uploadResourceInfo, User user, ResourceAuthorityTypeEnum resourceAuthorityEnum) {
String resourceType = uploadResourceInfo.getResourceType();
if (resourceType == null || !ResourceTypeEnum.containsName(resourceType)) {
ResponseFormat responseFormat = getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT);
Response errorResponse = buildErrorResponse(responseFormat);
- EnumMap<AuditingFieldsKeysEnum, Object> additionalParam = new EnumMap<AuditingFieldsKeysEnum, Object>(AuditingFieldsKeysEnum.class);
+ EnumMap additionalParam = new EnumMap(AuditingFieldsKeysEnum.class);
+ additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, uploadResourceInfo.getName());
+ getComponentsUtils().auditResource(responseFormat, user, null, "", "", AuditingActionEnum.IMPORT_RESOURCE, additionalParam);
+ responseWrapper.setInnerElement(errorResponse);
+ }
+ if (resourceType.equals(ResourceTypeEnum.getTypeByName("VF").getValue()) && resourceAuthorityEnum == ResourceAuthorityTypeEnum.NORMATIVE_TYPE_BE){
+ log.debug("Import of VF resource type is forbidden - VF resource import can be done using onboarding flow only");
+ ResponseFormat responseFormat = getComponentsUtils().getResponseFormat(ActionStatus.INVALID_RESOURCE_TYPE);
+ Response errorResponse = buildErrorResponse(responseFormat);
+ EnumMap additionalParam = new EnumMap(AuditingFieldsKeysEnum.class);
additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_NAME, uploadResourceInfo.getName());
getComponentsUtils().auditResource(responseFormat, user, null, "", "", AuditingActionEnum.IMPORT_RESOURCE, additionalParam);
responseWrapper.setInnerElement(errorResponse);
diff --git a/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_3_create_audit_template.rb b/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_3_create_audit_template.rb
index 2d882631f2..4e8136c626 100644
--- a/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_3_create_audit_template.rb
+++ b/sdc-os-chef/sdc-elasticsearch/chef-repo/cookbooks/sdc-elasticsearch/recipes/ES_3_create_audit_template.rb
@@ -236,3 +236,10 @@ bash "create audit mapping" do
"aliases": { "last_3_months": {}}}' http://localhost:9200/_template/audit_template
EOH
end
+
+bash "set default index for Kibana" do
+ code <<-EOH
+ curl -XPUT http://localhost:9200/.kibana/index-pattern/auditingevents-* -d '{"title" : "events-*", "timeFieldName": "TIMESTAMP"}'
+ curl -XPUT http://localhost:9200/.kibana/config/4.3.3 -d '{"defaultIndex" : "auditingevents-*"}'
+ EOH
+end
diff --git a/sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/recipes/setup_kibana.rb b/sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/recipes/setup_kibana.rb
index b30893c63f..448a2bc642 100644
--- a/sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/recipes/setup_kibana.rb
+++ b/sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/recipes/setup_kibana.rb
@@ -19,7 +19,7 @@ end
bash "echo status" do
code <<-EOH
- echo "DOCKER STARTED"
+ echo "DOCKER STARTED"
EOH
end
diff --git a/sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/templates/default/kibana.yml.erb b/sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/templates/default/kibana.yml.erb
index 7179a96512..d2c9e7d5c8 100644
--- a/sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/templates/default/kibana.yml.erb
+++ b/sdc-os-chef/sdc-kibana/chef-repo/cookbooks/sdc-kibana/templates/default/kibana.yml.erb
@@ -21,7 +21,7 @@ elasticsearch.url: "http://<%= @catalog_host %>:<%= @catalog_port %>/sdc2/esGate
# kibana.index: ".kibana"
# The default application to load.
-# kibana.defaultAppId: "discover"
+kibana.defaultAppId: "dashboard/BI-Dashboard"
# If your Elasticsearch is protected with basic auth, these are the user credentials
# used by the Kibana server to perform maintenance on the kibana_index at startup. Your Kibana
diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/sdc-sanity.yaml.erb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/sdc-sanity.yaml.erb
index 91c09db818..c57269c764 100644
--- a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/sdc-sanity.yaml.erb
+++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/templates/default/sdc-sanity.yaml.erb
@@ -18,6 +18,7 @@ errorConfigurationFile: <%= @errorConfigurationFile %>
configurationFile: <%= @ConfigurationFile %>
importTypesConfigDir: <%= @importTypesDir %>
titanPropertiesFile: <%= @titan_file %>
+systemUnderDebug: false
cassandraHost: <%= @CASSANDRA_IP %>
cassandraAuthenticate: true