Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
knowledge-platform
Commits
467aa1fb
Unverified
Commit
467aa1fb
authored
2 years ago
by
vinukumar-vs
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Issue #KN-231 merge: Merge pull request #871 from project-sunbird/release-4.10.1
Issue #KN-231 feat: from 4.10.1 to 5.0.0
parents
2aa5e968
bbb28e42
release-5.3.0
AmiableAnil-patch-1
Gcloud_copy
Gcloud_fix
Remove_unwantedCode_Gcloud_fix
bulk-upload-comptenecy-mapping
bulk-upload-excelsheet
bulk-upload-test_excel
bulk_upload
csp-migration
knowlg-oneclick
local-setup-kube
master
patch-1
patch-2
patch-3
poc_bulk_upload
rahul_bulk_upload_postgres
release-5.0.0
release-5.0.1
release-5.1.0
release-5.1.0-content
release-5.2.0
release-5.2.0_RC2
release-5.2.0_RC1
release-5.1.0_RC1
release-5.0.0_RC2
release-5.0.0_RC1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
platform-modules/mimetype-manager/pom.xml
+1
-1
platform-modules/mimetype-manager/pom.xml
platform-modules/mimetype-manager/src/main/scala/org/sunbird/cloudstore/StorageService.scala
+12
-7
...rc/main/scala/org/sunbird/cloudstore/StorageService.scala
with
13 additions
and
8 deletions
+13
-8
platform-modules/mimetype-manager/pom.xml
+
1
−
1
View file @
467aa1fb
...
...
@@ -30,7 +30,7 @@
<dependency>
<groupId>
org.sunbird
</groupId>
<artifactId>
cloud-store-sdk
</artifactId>
<version>
1.
3
.0
</version>
<version>
1.
4
.0
</version>
</dependency>
<dependency>
<groupId>
org.scala-lang
</groupId>
...
...
This diff is collapsed.
Click to expand it.
platform-modules/mimetype-manager/src/main/scala/org/sunbird/cloudstore/StorageService.scala
+
12
−
7
View file @
467aa1fb
...
...
@@ -28,14 +28,17 @@ class StorageService {
val
storageKey
=
Platform
.
config
.
getString
(
"aws_storage_key"
)
val
storageSecret
=
Platform
.
config
.
getString
(
"aws_storage_secret"
)
storageService
=
StorageServiceFactory
.
getStorageService
(
new
StorageConfig
(
storageType
,
storageKey
,
storageSecret
))
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
storageType
,
"gcloud"
))
{
val
storageKey
=
Platform
.
config
.
getString
(
"gcloud_client_key"
)
val
storageSecret
=
Platform
.
config
.
getString
(
"gcloud_private_secret"
)
storageService
=
StorageServiceFactory
.
getStorageService
(
new
StorageConfig
(
storageType
,
storageKey
,
storageSecret
))
}
else
if
(
StringUtils
.
equalsIgnoreCase
(
storageType
,
"cephs3"
))
{
val
storageKey
=
Platform
.
config
.
getString
(
"cephs3_storage_key"
)
val
storageSecret
=
Platform
.
config
.
getString
(
"cephs3_storage_secret"
)
val
endpoint
=
Platform
.
config
.
getString
(
"cephs3_storage_endpoint"
)
storageService
=
StorageServiceFactory
.
getStorageService
(
new
StorageConfig
(
storageType
,
storageKey
,
storageSecret
,
Option
(
endpoint
)))
}
// else if (StringUtils.equalsIgnoreCase(storageType, "cephs3")) {
// val storageKey = Platform.config.getString("cephs3_storage_key")
// val storageSecret = Platform.config.getString("cephs3_storage_secret")
// val endpoint = Platform.config.getString("cephs3_storage_endpoint")
// storageService = StorageServiceFactory.getStorageService(new StorageConfig(storageType, storageKey, storageSecret, Option(endpoint)))
// }
else
throw
new
ServerException
(
"ERR_INVALID_CLOUD_STORAGE"
,
"Error while initialising cloud storage"
)
}
storageService
...
...
@@ -46,6 +49,8 @@ class StorageService {
Platform
.
config
.
getString
(
"azure_storage_container"
)
else
if
(
StringUtils
.
equalsIgnoreCase
(
storageType
,
"aws"
))
Platform
.
config
.
getString
(
"aws_storage_container"
)
else
if
(
StringUtils
.
equalsIgnoreCase
(
storageType
,
"gcloud"
))
Platform
.
config
.
getString
(
"gcloud_storage_bucket"
)
else
if
(
StringUtils
.
equalsIgnoreCase
(
storageType
,
"cephs3"
))
Platform
.
config
.
getString
(
"cephs3_storage_container"
)
else
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets