1
+ // Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2
+ // Licensed under the Universal Permissive License v 1.0 as shown at
3
+ // http://oss.oracle.com/licenses/upl.
1
4
package oracle .kubernetes .operator .utils ;
2
5
3
6
import com .fasterxml .jackson .core .JsonProcessingException ;
14
17
import java .nio .file .Files ;
15
18
import java .nio .file .Path ;
16
19
import java .nio .file .Paths ;
17
- import java .util .HashMap ;
18
20
import java .util .Map ;
19
21
20
22
/** A Domain CRD utility class to manipulate domain yaml files */
@@ -23,31 +25,6 @@ public class DomainCRD {
23
25
private final ObjectMapper objectMapper ;
24
26
private final JsonNode root ;
25
27
26
- public static void main (String args []) throws IOException {
27
- DomainCRD crd = new DomainCRD ("c:\\ Users\\ Sankar\\ Downloads\\ res.yaml" );
28
-
29
- Map <String , String > admin = new HashMap ();
30
- admin .put ("restartVersion" , "v1.1" );
31
- crd .addObjectNodeToAdminServer (admin );
32
-
33
- Map <String , String > domain = new HashMap ();
34
- domain .put ("restartVersion" , "v1.1" );
35
- crd .addObjectNodeToDomain (domain );
36
-
37
- Map <String , String > cluster = new HashMap ();
38
- cluster .put ("restartVersion" , "v1.1" );
39
- crd .addObjectNodeToCluster ("cluster-1" , cluster );
40
- System .out .println (crd .getYamlTree ());
41
-
42
- Map <String , String > ms = new HashMap ();
43
- ms .put ("restartVersion" , "v1.1" );
44
- ms .put ("serverStartPolicy" , "IF_NEEDED" );
45
- ms .put ("serverStartState" , "RUNNING" );
46
- crd .addObjectNodeToMS ("managedserver-1" , ms );
47
-
48
- System .out .println (crd .getYamlTree ());
49
- }
50
-
51
28
/**
52
29
* Constructor to read the yaml file and initialize the root JsonNode with yaml equivalent of JSON
53
30
* tree
0 commit comments