You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/05/25 02:04:37 UTC
[1/4] ambari git commit: AMBARI-21114 - Fix Unit Test Failures From
Prior Patch/Service Upgrade Commits (jonathanhurley)
Repository: ambari
Updated Branches:
refs/heads/branch-feature-AMBARI-12556 2cfc8d22d -> 770c519a9
http://git-wip-us.apache.org/repos/asf/ambari/blob/770c519a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
index b228988..cfb7726 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java
@@ -182,7 +182,7 @@ public class UpgradeHelper {
* {@link StageWrapperBuilder} has finished building out all of the stages.
*/
@Inject
- private Provider<ConfigHelper> m_configHelperProvider;
+ Provider<ConfigHelper> m_configHelperProvider;
@Inject
private Provider<AmbariMetaInfo> m_ambariMetaInfoProvider;
@@ -203,7 +203,7 @@ public class UpgradeHelper {
* Used to get configurations by service name.
*/
@Inject
- private ServiceConfigDAO m_serviceConfigDAO;
+ ServiceConfigDAO m_serviceConfigDAO;
/**
* Get right Upgrade Pack, depends on stack, direction and upgrade type
http://git-wip-us.apache.org/repos/asf/ambari/blob/770c519a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
index f79b1c2..a631448 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/StackUpgradeConfigurationMergeTest.java
@@ -17,8 +17,13 @@
*/
package org.apache.ambari.server.controller.internal;
-import java.util.ArrayList;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.junit.Assert.assertEquals;
+
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import javax.persistence.EntityManager;
@@ -28,7 +33,6 @@ import org.apache.ambari.server.actionmanager.HostRoleCommandFactory;
import org.apache.ambari.server.actionmanager.HostRoleCommandFactoryImpl;
import org.apache.ambari.server.actionmanager.RequestFactory;
import org.apache.ambari.server.actionmanager.StageFactory;
-import org.apache.ambari.server.api.services.AmbariMetaInfo;
import org.apache.ambari.server.controller.AbstractRootServiceResponseFactory;
import org.apache.ambari.server.controller.AmbariManagementController;
import org.apache.ambari.server.controller.KerberosHelper;
@@ -38,8 +42,10 @@ import org.apache.ambari.server.hooks.HookService;
import org.apache.ambari.server.orm.DBAccessor;
import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
+import org.apache.ambari.server.orm.dao.ServiceConfigDAO;
+import org.apache.ambari.server.orm.entities.ClusterConfigEntity;
import org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
-import org.apache.ambari.server.orm.entities.StackEntity;
+import org.apache.ambari.server.orm.entities.ServiceConfigEntity;
import org.apache.ambari.server.scheduler.ExecutionScheduler;
import org.apache.ambari.server.security.authorization.Users;
import org.apache.ambari.server.stack.StackManagerFactory;
@@ -50,10 +56,12 @@ import org.apache.ambari.server.state.Config;
import org.apache.ambari.server.state.ConfigFactory;
import org.apache.ambari.server.state.ConfigHelper;
import org.apache.ambari.server.state.DesiredConfig;
+import org.apache.ambari.server.state.RepositoryType;
+import org.apache.ambari.server.state.Service;
+import org.apache.ambari.server.state.ServiceComponent;
import org.apache.ambari.server.state.ServiceComponentFactory;
import org.apache.ambari.server.state.ServiceComponentHostFactory;
import org.apache.ambari.server.state.ServiceFactory;
-import org.apache.ambari.server.state.ServiceInfo;
import org.apache.ambari.server.state.StackId;
import org.apache.ambari.server.state.UpgradeContext;
import org.apache.ambari.server.state.UpgradeContextFactory;
@@ -63,7 +71,7 @@ import org.apache.ambari.server.state.scheduler.RequestExecutionFactory;
import org.apache.ambari.server.state.stack.OsFamily;
import org.apache.ambari.server.state.stack.UpgradePack;
import org.apache.ambari.server.state.stack.upgrade.Direction;
-import org.apache.ambari.server.state.stack.upgrade.Grouping;
+import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
import org.easymock.Capture;
import org.easymock.EasyMock;
import org.easymock.EasyMockSupport;
@@ -73,14 +81,14 @@ import org.junit.Before;
import org.junit.Test;
import org.springframework.security.crypto.password.PasswordEncoder;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
import com.google.inject.Binder;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.assistedinject.FactoryModuleBuilder;
-import junit.framework.Assert;
-
/**
* Tests that
* {@link UpgradeResourceProvider#applyStackAndProcessConfigurations(String, Cluster, String, Direction, UpgradePack, String)}
@@ -88,19 +96,13 @@ import junit.framework.Assert;
*/
public class StackUpgradeConfigurationMergeTest extends EasyMockSupport {
- private static final StackId s_currentStackId = new StackId("HDP-2.4");
- private static final StackId s_targetStackId = new StackId("HDP-2.5");
-
private Injector m_injector;
- private AmbariMetaInfo m_ambariMetaInfoMock;
/**
* @throws Exception
*/
@Before
public void before() throws Exception {
- m_ambariMetaInfoMock = createNiceMock(AmbariMetaInfo.class);
-
MockModule mockModule = new MockModule();
// create an injector which will inject the mocks
@@ -120,14 +122,14 @@ public class StackUpgradeConfigurationMergeTest extends EasyMockSupport {
* accidentally.
* <p/>
*
- * HDP 2.4 defaults
+ * HDP 2.1 defaults
* <ul>
* <li>foo-site/foo-property-1</li>
* <li>foo-site/foo-property-2</li>
* <li>bar-site/bar-property-1</li>
* </ul>
*
- * HDP 2.5 defaults
+ * HDP 2.2 defaults
* <ul>
* <li>foo-site/foo-property-1</li>
* <li>foo-site/foo-property-2</li>
@@ -135,7 +137,7 @@ public class StackUpgradeConfigurationMergeTest extends EasyMockSupport {
* <li>bar-site/bar-property-2</li>
* </ul>
*
- * CURRENT 2.4 configs
+ * CURRENT 2.1 configs
* <ul>
* <li>foo-site/foo-property-1</li>
* <li>foo-site/foo-property-99</li>
@@ -146,132 +148,144 @@ public class StackUpgradeConfigurationMergeTest extends EasyMockSupport {
*
* The final merged configurations should detect that {{foo-property-2}}
* exists in both stacks but is not in the current configs and was therefore
- * purposefully removed. It shoudl also detect that {{bar-property-20}} was
+ * purposefully removed. It shoudl also detect that {{bar-property-2}} was
* added in the new stack and should be added in.
*
* @throws Exception
*/
@Test
public void testMergedConfigurationsDoNotAddExplicitelyRemovedProperties() throws Exception {
- Cluster cluster = createNiceMock(Cluster.class);
- RepositoryVersionEntity repositoryVersionEntity = createNiceMock(RepositoryVersionEntity.class);
- UpgradePack upgradePack = createNiceMock(UpgradePack.class);
- StackEntity targetStack = createNiceMock(StackEntity.class);
- StackId targetStackId = createNiceMock(StackId.class);
+ RepositoryVersionEntity repoVersion211 = createNiceMock(RepositoryVersionEntity.class);
+ RepositoryVersionEntity repoVersion220 = createNiceMock(RepositoryVersionEntity.class);
+
+ StackId stack211 = new StackId("HDP-2.1.1");
+ StackId stack220 = new StackId("HDP-2.2.0");
+
+ String version211 = "2.1.1.0-1234";
+ String version220 = "2.2.0.0-1234";
+
+ expect(repoVersion211.getStackId()).andReturn(stack211).atLeastOnce();
+ expect(repoVersion211.getVersion()).andReturn(version211).atLeastOnce();
+
+ expect(repoVersion220.getStackId()).andReturn(stack220).atLeastOnce();
+ expect(repoVersion220.getVersion()).andReturn(version220).atLeastOnce();
+
+ Map<String, Map<String, String>> stack211Configs = new HashMap<>();
+ Map<String, String> stack211FooType = new HashMap<>();
+ Map<String, String> stack211BarType = new HashMap<>();
+ stack211Configs.put("foo-site", stack211FooType);
+ stack211Configs.put("bar-site", stack211BarType);
+ stack211FooType.put("foo-property-1", "stack-211-original");
+ stack211FooType.put("foo-property-2", "stack-211-original");
+ stack211BarType.put("bar-property-1", "stack-211-original");
+
+ Map<String, Map<String, String>> stack220Configs = new HashMap<>();
+ Map<String, String> stack220FooType = new HashMap<>();
+ Map<String, String> stack220BarType = new HashMap<>();
+ stack220Configs.put("foo-site", stack220FooType);
+ stack220Configs.put("bar-site", stack220BarType);
+ stack220FooType.put("foo-property-1", "stack-220-original");
+ stack220FooType.put("foo-property-2", "stack-220-original");
+ stack220BarType.put("bar-property-1", "stack-220-original");
+ stack220BarType.put("bar-property-2", "stack-220-original");
+
+ Map<String, String> existingFooType = new HashMap<>();
+ Map<String, String> existingBarType = new HashMap<>();
+
+ ClusterConfigEntity fooConfigEntity = createNiceMock(ClusterConfigEntity.class);
+ ClusterConfigEntity barConfigEntity = createNiceMock(ClusterConfigEntity.class);
+
+ expect(fooConfigEntity.getType()).andReturn("foo-site");
+ expect(barConfigEntity.getType()).andReturn("bar-site");
+
+ Config fooConfig = createNiceMock(Config.class);
+ Config barConfig = createNiceMock(Config.class);
+
+ existingFooType.put("foo-property-1", "my-foo-property-1");
+ existingBarType.put("bar-property-1", "stack-211-original");
+
+ expect(fooConfig.getType()).andReturn("foo-site").atLeastOnce();
+ expect(barConfig.getType()).andReturn("bar-site").atLeastOnce();
+ expect(fooConfig.getProperties()).andReturn(existingFooType);
+ expect(barConfig.getProperties()).andReturn(existingBarType);
+
+ Map<String, DesiredConfig> desiredConfigurations = new HashMap<>();
+ desiredConfigurations.put("foo-site", null);
+ desiredConfigurations.put("bar-site", null);
+
+ Service zookeeper = createNiceMock(Service.class);
+ expect(zookeeper.getName()).andReturn("ZOOKEEPER").atLeastOnce();
+ expect(zookeeper.getServiceComponents()).andReturn(
+ new HashMap<String, ServiceComponent>()).once();
+ zookeeper.setDesiredRepositoryVersion(repoVersion220);
+ expectLastCall().once();
- String version = "2.5.0.0-1234";
+ Cluster cluster = createNiceMock(Cluster.class);
+ expect(cluster.getCurrentStackVersion()).andReturn(stack211).atLeastOnce();
+ expect(cluster.getDesiredStackVersion()).andReturn(stack220);
+ expect(cluster.getDesiredConfigs()).andReturn(desiredConfigurations);
+ expect(cluster.getDesiredConfigByType("foo-site")).andReturn(fooConfig);
+ expect(cluster.getDesiredConfigByType("bar-site")).andReturn(barConfig);
+ expect(cluster.getService("ZOOKEEPER")).andReturn(zookeeper);
+ expect(cluster.getDesiredConfigByType("foo-type")).andReturn(fooConfig);
+ expect(cluster.getDesiredConfigByType("bar-type")).andReturn(barConfig);
- // mocks which were bound previously
- AmbariManagementController amc = m_injector.getInstance(AmbariManagementController.class);
- AmbariMetaInfo ambariMetaInfo = m_injector.getInstance(AmbariMetaInfo.class);
ConfigHelper configHelper = m_injector.getInstance(ConfigHelper.class);
- RepositoryVersionDAO repositoryVersionDAO = m_injector.getInstance(RepositoryVersionDAO.class);
-
- EasyMock.expect(amc.getConfigHelper()).andReturn(configHelper);
-
- EasyMock.expect(cluster.getCurrentStackVersion()).andReturn(s_currentStackId);
- EasyMock.expect(cluster.getDesiredStackVersion()).andReturn(s_targetStackId);
-
- EasyMock.expect(targetStack.getStackName()).andReturn("HDP").anyTimes();
- EasyMock.expect(targetStack.getStackVersion()).andReturn("2.5").anyTimes();
- EasyMock.expect(targetStackId.getStackName()).andReturn("HDP").atLeastOnce();
- EasyMock.expect(targetStackId.getStackVersion()).andReturn("2.5").atLeastOnce();
-
- EasyMock.expect(repositoryVersionEntity.getStackId()).andReturn(targetStackId).atLeastOnce();
- EasyMock.expect(repositoryVersionEntity.getStack()).andReturn(targetStack).atLeastOnce();
- EasyMock.expect(repositoryVersionEntity.getVersion()).andReturn(version).atLeastOnce();
- EasyMock.expect(repositoryVersionDAO.findByStackNameAndVersion("HDP", version)).andReturn(
- repositoryVersionEntity);
-
- EasyMock.expect(upgradePack.getGroups(Direction.UPGRADE)).andReturn(new ArrayList<Grouping>());
-
- EasyMock.expect(ambariMetaInfo.getServices("HDP", "2.5")).andReturn(
- new HashMap<String, ServiceInfo>());
-
- // config helper mocks (the heart of this test)
- Map<String, Map<String, String>> oldStackDefaultConfigurationsByType = new HashMap<>();
- oldStackDefaultConfigurationsByType.put("foo-type", new HashMap<String, String>());
- oldStackDefaultConfigurationsByType.get("foo-type").put("foo-property-1", "foo-value-1");
- oldStackDefaultConfigurationsByType.get("foo-type").put("foo-property-2", "foo-value-2");
- oldStackDefaultConfigurationsByType.put("bar-type", new HashMap<String, String>());
- oldStackDefaultConfigurationsByType.get("bar-type").put("bar-property-1", "bar-value-1");
-
- Map<String, Map<String, String>> newConfigurationsByType = new HashMap<>();
- newConfigurationsByType.put("foo-type", new HashMap<String, String>());
- newConfigurationsByType.get("foo-type").put("foo-property-1", "foo-value-1");
- newConfigurationsByType.get("foo-type").put("foo-property-2", "foo-value-2");
- newConfigurationsByType.put("bar-type", new HashMap<String, String>());
- newConfigurationsByType.get("bar-type").put("bar-property-1", "bar-value-1");
- newConfigurationsByType.get("bar-type").put("bar-property-20", "bar-value-20");
-
- // HDP 2.4 configs
- EasyMock.expect(configHelper.getDefaultProperties(EasyMock.eq(s_currentStackId),
- EasyMock.anyString())).andReturn(oldStackDefaultConfigurationsByType);
-
- // HDP 2.5 configs
- EasyMock.expect(configHelper.getDefaultProperties(EasyMock.eq(s_targetStackId),
- EasyMock.anyString())).andReturn(newConfigurationsByType);
-
- // CURRENT HDP 2.4 configs
- Config currentClusterConfigFoo = createNiceMock(Config.class);
- Config currentClusterConfigBar = createNiceMock(Config.class);
-
- Map<String, String> existingPropertiesFoo = new HashMap<>();
- existingPropertiesFoo.put("foo-property-1", "foo-value-1");
- existingPropertiesFoo.put("foo-property-99", "foo-value-99");
- EasyMock.expect(currentClusterConfigFoo.getProperties()).andReturn(existingPropertiesFoo);
-
- Map<String, String> existingPropertiesBar = new HashMap<>();
- existingPropertiesBar.put("bar-property-1", "bar-value-1");
- existingPropertiesBar.put("bar-property-99", "bar-value-99");
- EasyMock.expect(currentClusterConfigBar.getProperties()).andReturn(existingPropertiesBar);
-
- EasyMock.expect(cluster.getDesiredConfigByType("foo-type")).andReturn(currentClusterConfigFoo);
- EasyMock.expect(cluster.getDesiredConfigByType("bar-type")).andReturn(currentClusterConfigBar);
-
- // desired configs
- Map<String, DesiredConfig> existingDesiredConfigurationsByType = new HashMap<>();
- existingDesiredConfigurationsByType.put("foo-type", null);
- existingDesiredConfigurationsByType.put("bar-type", null);
- EasyMock.expect(cluster.getDesiredConfigs()).andReturn(existingDesiredConfigurationsByType);
-
- // we need to know what configs are being created, so capture them
- Capture<Map<String, Map<String, String>>> capturedArgument = EasyMock.newCapture();
+
+ expect(configHelper.getDefaultProperties(stack211, "ZOOKEEPER")).andReturn(
+ stack211Configs).anyTimes();
+
+ expect(configHelper.getDefaultProperties(stack220, "ZOOKEEPER")).andReturn(
+ stack220Configs).anyTimes();
+
+ Capture<Map<String, Map<String, String>>> expectedConfigurationsCapture = EasyMock.newCapture();
+
configHelper.createConfigTypes(EasyMock.anyObject(Cluster.class),
- EasyMock.anyObject(AmbariManagementController.class),
- EasyMock.anyObject(StackId.class),
- EasyMock.capture(capturedArgument),
- EasyMock.anyString(), EasyMock.anyString());
-
- EasyMock.expectLastCall();
-
- UpgradeContext upgradeContext = createNiceMock(UpgradeContext.class);
- EasyMock.expect(upgradeContext.getAmbariMetaInfo()).andReturn(ambariMetaInfo).anyTimes();
- EasyMock.expect(upgradeContext.getCluster()).andReturn(cluster).anyTimes();
- EasyMock.expect(upgradeContext.getDirection()).andReturn(Direction.UPGRADE).anyTimes();
- EasyMock.expect(upgradeContext.getUpgradePack()).andReturn(upgradePack).anyTimes();
- EasyMock.expect(upgradeContext.getRepositoryVersion()).andReturn(repositoryVersionEntity).anyTimes();
- EasyMock.expect(upgradeContext.getTargetRepositoryVersion(EasyMock.anyString())).andReturn(repositoryVersionEntity).anyTimes();
+ EasyMock.anyObject(AmbariManagementController.class), EasyMock.anyObject(StackId.class),
+ EasyMock.capture(expectedConfigurationsCapture), EasyMock.anyObject(String.class),
+ EasyMock.anyObject(String.class));
+
+ expectLastCall().once();
+
+ // mock the service config DAO and replay it
+ ServiceConfigEntity zookeeperServiceConfig = createNiceMock(ServiceConfigEntity.class);
+ expect(zookeeperServiceConfig.getClusterConfigEntities()).andReturn(
+ Lists.newArrayList(fooConfigEntity, barConfigEntity));
+
+ ServiceConfigDAO serviceConfigDAOMock = m_injector.getInstance(ServiceConfigDAO.class);
+ List<ServiceConfigEntity> latestServiceConfigs = Lists.newArrayList(zookeeperServiceConfig);
+ expect(serviceConfigDAOMock.getLastServiceConfigsForService(EasyMock.anyLong(),
+ eq("ZOOKEEPER"))).andReturn(latestServiceConfigs).once();
+
+ UpgradeContext context = createNiceMock(UpgradeContext.class);
+ expect(context.getCluster()).andReturn(cluster).atLeastOnce();
+ expect(context.getType()).andReturn(UpgradeType.ROLLING).atLeastOnce();
+ expect(context.getDirection()).andReturn(Direction.UPGRADE).atLeastOnce();
+ expect(context.getRepositoryVersion()).andReturn(repoVersion220).anyTimes();
+ expect(context.getSupportedServices()).andReturn(Sets.newHashSet("ZOOKEEPER")).atLeastOnce();
+ expect(context.getSourceRepositoryVersion(EasyMock.anyString())).andReturn(repoVersion211).atLeastOnce();
+ expect(context.getTargetRepositoryVersion(EasyMock.anyString())).andReturn(repoVersion220).atLeastOnce();
+ expect(context.getRepositoryType()).andReturn(RepositoryType.STANDARD).anyTimes();
+ expect(context.getHostRoleCommandFactory()).andStubReturn(m_injector.getInstance(HostRoleCommandFactory.class));
+ expect(context.getRoleGraphFactory()).andStubReturn(m_injector.getInstance(RoleGraphFactory.class));
+
replayAll();
UpgradeHelper upgradeHelper = m_injector.getInstance(UpgradeHelper.class);
- upgradeHelper.updateDesiredRepositoriesAndConfigs(upgradeContext);
-
- // assertion time!
- Map<String, Map<String, String>> mergedConfigurations = capturedArgument.getValue();
- Map<String, String> mergedFooSite = mergedConfigurations.get("foo-type");
- Map<String, String> mergedBarSite = mergedConfigurations.get("bar-type");
-
- // foo-site validation
- Assert.assertEquals("foo-value-1", mergedFooSite.get("foo-property-1"));
- Assert.assertEquals("foo-value-99", mergedFooSite.get("foo-property-99"));
- Assert.assertFalse(mergedFooSite.containsKey("foo-property-2"));
-
- // bar-site validation
- Assert.assertEquals("bar-value-1", mergedBarSite.get("bar-property-1"));
- Assert.assertEquals("bar-value-20", mergedBarSite.get("bar-property-20"));
- Assert.assertEquals("bar-value-99", mergedBarSite.get("bar-property-99"));
- Assert.assertEquals(3, mergedBarSite.size());
+ upgradeHelper.updateDesiredRepositoriesAndConfigs(context);
+
+ Map<String, Map<String, String>> expectedConfigurations = expectedConfigurationsCapture.getValue();
+ Map<String, String> expectedFooType = expectedConfigurations.get("foo-site");
+ Map<String, String> expectedBarType = expectedConfigurations.get("bar-site");
+
+ // As the upgrade pack did not have any Flume updates, its configs should
+ // not be updated.
+ assertEquals(2, expectedConfigurations.size());
+
+ assertEquals("my-foo-property-1", expectedFooType.get("foo-property-1"));
+ assertEquals(null, expectedFooType.get("foo-property-2"));
+ assertEquals("stack-220-original", expectedBarType.get("bar-property-1"));
+ assertEquals("stack-220-original", expectedBarType.get("bar-property-2"));
}
@@ -282,7 +296,6 @@ public class StackUpgradeConfigurationMergeTest extends EasyMockSupport {
*/
@Override
public void configure(Binder binder) {
- binder.bind(AmbariMetaInfo.class).toInstance(m_ambariMetaInfoMock);
binder.bind(Clusters.class).toInstance(createNiceMock(Clusters.class));
binder.bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class));
binder.bind(DBAccessor.class).toInstance(createNiceMock(DBAccessor.class));
@@ -311,6 +324,7 @@ public class StackUpgradeConfigurationMergeTest extends EasyMockSupport {
binder.bind(RepositoryVersionDAO.class).toInstance(createNiceMock(RepositoryVersionDAO.class));
binder.bind(HookContextFactory.class).toInstance(createMock(HookContextFactory.class));
binder.bind(HookService.class).toInstance(createMock(HookService.class));
+ binder.bind(ServiceConfigDAO.class).toInstance(createNiceMock(ServiceConfigDAO.class));
binder.install(new FactoryModuleBuilder().build(UpgradeContextFactory.class));
binder.bind(HostRoleCommandFactory.class).to(HostRoleCommandFactoryImpl.class);
http://git-wip-us.apache.org/repos/asf/ambari/blob/770c519a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
index 04773bc..f63f706 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
@@ -17,7 +17,6 @@
*/
package org.apache.ambari.server.controller.internal;
-import static org.easymock.EasyMock.createNiceMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.junit.Assert.assertEquals;
@@ -47,7 +46,6 @@ import org.apache.ambari.server.actionmanager.HostRoleCommand;
import org.apache.ambari.server.actionmanager.HostRoleStatus;
import org.apache.ambari.server.actionmanager.Stage;
import org.apache.ambari.server.agent.ExecutionCommand.KeyNames;
-import org.apache.ambari.server.api.services.AmbariMetaInfo;
import org.apache.ambari.server.audit.AuditLogger;
import org.apache.ambari.server.configuration.Configuration;
import org.apache.ambari.server.controller.AmbariManagementController;
@@ -87,7 +85,6 @@ import org.apache.ambari.server.state.Clusters;
import org.apache.ambari.server.state.Config;
import org.apache.ambari.server.state.ConfigFactory;
import org.apache.ambari.server.state.ConfigHelper;
-import org.apache.ambari.server.state.DesiredConfig;
import org.apache.ambari.server.state.Host;
import org.apache.ambari.server.state.HostState;
import org.apache.ambari.server.state.Service;
@@ -97,14 +94,13 @@ import org.apache.ambari.server.state.StackId;
import org.apache.ambari.server.state.UpgradeContext;
import org.apache.ambari.server.state.UpgradeHelper;
import org.apache.ambari.server.state.UpgradeState;
-import org.apache.ambari.server.state.stack.UpgradePack;
import org.apache.ambari.server.state.stack.upgrade.Direction;
import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
import org.apache.ambari.server.topology.TopologyManager;
import org.apache.ambari.server.utils.StageUtils;
import org.apache.ambari.server.view.ViewRegistry;
-import org.easymock.Capture;
import org.easymock.EasyMock;
+import org.easymock.EasyMockSupport;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -125,7 +121,7 @@ import com.google.inject.util.Modules;
/**
* UpgradeResourceDefinition tests.
*/
-public class UpgradeResourceProviderTest {
+public class UpgradeResourceProviderTest extends EasyMockSupport {
private UpgradeDAO upgradeDao = null;
private RequestDAO requestDao = null;
@@ -135,7 +131,6 @@ public class UpgradeResourceProviderTest {
private AmbariManagementController amc;
private ConfigHelper configHelper;
private StackDAO stackDAO;
- private AmbariMetaInfo ambariMetaInfo;
private TopologyManager topologyManager;
private ConfigFactory configFactory;
private HostRoleCommandDAO hrcDAO;
@@ -144,6 +139,12 @@ public class UpgradeResourceProviderTest {
RepositoryVersionEntity repoVersionEntity2111;
RepositoryVersionEntity repoVersionEntity2200;
+ /**
+ * Creates a single host cluster with ZOOKEEPER_SERVER and ZOOKEEPER_CLIENT on
+ * {@link #repoVersionEntity2110}.
+ *
+ * @throws Exception
+ */
@Before
public void before() throws Exception {
SecurityContextHolder.getContext().setAuthentication(
@@ -162,19 +163,18 @@ public class UpgradeResourceProviderTest {
EasyMock.anyString())).andReturn(
new HashMap<String, Map<String, String>>()).anyTimes();
-
- EasyMock.replay(configHelper);
+ replay(configHelper);
InMemoryDefaultTestModule module = new InMemoryDefaultTestModule();
// create an injector which will inject the mocks
- injector = Guice.createInjector(Modules.override(module).with(new MockModule()));
+ injector = Guice.createInjector(
+ Modules.override(module).with(new MockModule()));
H2DatabaseCleaner.resetSequences(injector);
injector.getInstance(GuiceJpaInitializer.class);
amc = injector.getInstance(AmbariManagementController.class);
- ambariMetaInfo = injector.getInstance(AmbariMetaInfo.class);
configFactory = injector.getInstance(ConfigFactory.class);
Field field = AmbariServer.class.getDeclaredField("clusterController");
@@ -187,7 +187,7 @@ public class UpgradeResourceProviderTest {
repoVersionDao = injector.getInstance(RepositoryVersionDAO.class);
hrcDAO = injector.getInstance(HostRoleCommandDAO.class);
- AmbariEventPublisher publisher = createNiceMock(AmbariEventPublisher.class);
+ AmbariEventPublisher publisher = EasyMock.createNiceMock(AmbariEventPublisher.class);
replay(publisher);
ViewRegistry.initInstance(new ViewRegistry(publisher));
@@ -591,11 +591,6 @@ public class UpgradeResourceProviderTest {
Cluster cluster = clusters.getCluster("c1");
Service service = cluster.getService("ZOOKEEPER");
- // this should get skipped
- ServiceComponent component = service.getServiceComponent("ZOOKEEPER_SERVER");
- ServiceComponentHost sch = component.addServiceComponentHost("h2");
- sch.setVersion(repoVersionEntity2200.getVersion());
-
// start out with 0 (sanity check)
List<UpgradeEntity> upgrades = upgradeDao.findUpgrades(cluster.getClusterId());
assertEquals(0, upgrades.size());
@@ -616,10 +611,32 @@ public class UpgradeResourceProviderTest {
upgradeEntity.setUpgradeType(UpgradeType.ROLLING);
upgradeEntity.setRequestEntity(requestEntity);
+ UpgradeHistoryEntity history = new UpgradeHistoryEntity();
+ history.setUpgrade(upgradeEntity);
+ history.setFromRepositoryVersion(service.getDesiredRepositoryVersion());
+ history.setTargetRepositoryVersion(repoVersionEntity2200);
+ history.setServiceName(service.getName());
+ history.setComponentName("ZOKKEEPER_SERVER");
+ upgradeEntity.addHistory(history);
+
+ history = new UpgradeHistoryEntity();
+ history.setUpgrade(upgradeEntity);
+ history.setFromRepositoryVersion(service.getDesiredRepositoryVersion());
+ history.setTargetRepositoryVersion(repoVersionEntity2200);
+ history.setServiceName(service.getName());
+ history.setComponentName("ZOKKEEPER_CLIENT");
+ upgradeEntity.addHistory(history);
+
upgradeDao.create(upgradeEntity);
upgrades = upgradeDao.findUpgrades(cluster.getClusterId());
assertEquals(1, upgrades.size());
+ // push a ZK server foward to the new repo version, leaving the old one on
+ // the old version
+ ServiceComponent component = service.getServiceComponent("ZOOKEEPER_SERVER");
+ ServiceComponentHost sch = component.addServiceComponentHost("h2");
+ sch.setVersion(repoVersionEntity2200.getVersion());
+
UpgradeEntity lastUpgrade = upgradeDao.findLastUpgradeForCluster(cluster.getClusterId(), Direction.UPGRADE);
assertNotNull(lastUpgrade);
@@ -645,10 +662,11 @@ public class UpgradeResourceProviderTest {
List<UpgradeGroupEntity> upgradeGroups = downgrade.getUpgradeGroups();
assertEquals(3, upgradeGroups.size());
+ // the ZK restart group should only have 3 entries since the ZK server on h1
+ // didn't get upgraded
UpgradeGroupEntity group = upgradeGroups.get(1);
assertEquals("ZOOKEEPER", group.getName());
- assertEquals(4, group.getItems().size());
-
+ assertEquals(3, group.getItems().size());
}
@@ -1036,7 +1054,7 @@ public class UpgradeResourceProviderTest {
@Test
public void testCreateCrossStackUpgrade() throws Exception {
Cluster cluster = clusters.getCluster("c1");
- StackId oldStack = cluster.getDesiredStackVersion();
+ StackId oldStack = repoVersionEntity2110.getStackId();
for (Service s : cluster.getServices().values()) {
assertEquals(oldStack, s.getDesiredStackId());
@@ -1054,6 +1072,7 @@ public class UpgradeResourceProviderTest {
Config config = configFactory.createNew(cluster, "zoo.cfg", "abcdefg", Collections.singletonMap("a", "b"), null);
cluster.addDesiredConfig("admin", Collections.singleton(config));
+ // create the upgrade across major versions
Map<String, Object> requestProps = new HashMap<>();
requestProps.put(UpgradeResourceProvider.UPGRADE_CLUSTER_NAME, "c1");
requestProps.put(UpgradeResourceProvider.UPGRADE_REPO_VERSION_ID, String.valueOf(repoVersionEntity2200.getId()));
@@ -1062,7 +1081,6 @@ public class UpgradeResourceProviderTest {
requestProps.put(UpgradeResourceProvider.UPGRADE_DIRECTION, Direction.UPGRADE.name());
ResourceProvider upgradeResourceProvider = createProvider(amc);
-
Request request = PropertyHelper.getCreateRequest(Collections.singleton(requestProps), null);
upgradeResourceProvider.createResources(request);
@@ -1080,10 +1098,6 @@ public class UpgradeResourceProviderTest {
assertTrue(cluster.getDesiredConfigs().containsKey("zoo.cfg"));
- StackId newStack = cluster.getDesiredStackVersion();
-
- assertFalse(oldStack.equals(newStack));
-
for (Service s : cluster.getServices().values()) {
assertEquals(repoVersionEntity2200, s.getDesiredRepositoryVersion());
@@ -1094,135 +1108,6 @@ public class UpgradeResourceProviderTest {
}
/**
- * Tests merging configurations between existing and new stack values on
- * upgrade.
- *
- * @throws Exception
- */
- @Test
- public void testMergeConfigurations() throws Exception {
- RepositoryVersionEntity repoVersion211 = createNiceMock(RepositoryVersionEntity.class);
- RepositoryVersionEntity repoVersion220 = createNiceMock(RepositoryVersionEntity.class);
-
- StackId stack211 = new StackId("HDP-2.1.1");
- StackId stack220 = new StackId("HDP-2.2.0");
-
- String version211 = "2.1.1.0-1234";
- String version220 = "2.2.0.0-1234";
-
- EasyMock.expect(repoVersion211.getStackId()).andReturn(stack211).atLeastOnce();
- EasyMock.expect(repoVersion211.getVersion()).andReturn(version211).atLeastOnce();
-
- EasyMock.expect(repoVersion220.getStackId()).andReturn(stack220).atLeastOnce();
- EasyMock.expect(repoVersion220.getVersion()).andReturn(version220).atLeastOnce();
-
- Map<String, Map<String, String>> stack211Configs = new HashMap<>();
- Map<String, String> stack211FooType = new HashMap<>();
- Map<String, String> stack211BarType = new HashMap<>();
- Map<String, String> stack211BazType = new HashMap<>();
- stack211Configs.put("foo-site", stack211FooType);
- stack211Configs.put("bar-site", stack211BarType);
- stack211Configs.put("baz-site", stack211BazType);
- stack211FooType.put("1", "one");
- stack211FooType.put("11", "one-one");
- stack211BarType.put("2", "two");
- stack211BazType.put("3", "three");
-
- Map<String, Map<String, String>> stack220Configs = new HashMap<>();
- Map<String, String> stack220FooType = new HashMap<>();
- Map<String, String> stack220BazType = new HashMap<>();
- Map<String, String> stack220FlumeEnvType = new HashMap<>();
- stack220Configs.put("foo-site", stack220FooType);
- stack220Configs.put("baz-site", stack220BazType);
- stack220Configs.put("flume-env", stack220FlumeEnvType);
- stack220FooType.put("1", "one-new");
- stack220FooType.put("111", "one-one-one");
- stack220BazType.put("3", "three-new");
- stack220FlumeEnvType.put("flume_env_key", "flume-env-value");
-
- Map<String, String> clusterFooType = new HashMap<>();
- Map<String, String> clusterBarType = new HashMap<>();
- Map<String, String> clusterBazType = new HashMap<>();
-
- Config fooConfig = EasyMock.createNiceMock(Config.class);
- Config barConfig = EasyMock.createNiceMock(Config.class);
- Config bazConfig = EasyMock.createNiceMock(Config.class);
-
- clusterFooType.put("1", "one");
- clusterFooType.put("11", "one-one");
- clusterBarType.put("2", "two");
- clusterBazType.put("3", "three-changed");
-
- expect(fooConfig.getProperties()).andReturn(clusterFooType);
- expect(barConfig.getProperties()).andReturn(clusterBarType);
- expect(bazConfig.getProperties()).andReturn(clusterBazType);
-
- Map<String, DesiredConfig> desiredConfigurations = new HashMap<>();
- desiredConfigurations.put("foo-site", null);
- desiredConfigurations.put("bar-site", null);
- desiredConfigurations.put("baz-site", null);
-
- Cluster cluster = EasyMock.createNiceMock(Cluster.class);
- expect(cluster.getCurrentStackVersion()).andReturn(stack211).atLeastOnce();
- expect(cluster.getDesiredStackVersion()).andReturn(stack220);
- expect(cluster.getDesiredConfigs()).andReturn(desiredConfigurations);
- expect(cluster.getDesiredConfigByType("foo-site")).andReturn(fooConfig);
- expect(cluster.getDesiredConfigByType("bar-site")).andReturn(barConfig);
- expect(cluster.getDesiredConfigByType("baz-site")).andReturn(bazConfig);
-
- // setup the config helper for placeholder resolution
- EasyMock.reset(configHelper);
-
- expect(
- configHelper.getDefaultProperties(EasyMock.eq(stack211), EasyMock.anyString())).andReturn(
- stack211Configs).anyTimes();
-
- expect(
- configHelper.getDefaultProperties(EasyMock.eq(stack220), EasyMock.anyString())).andReturn(
- stack220Configs).anyTimes();
-
- Capture<Map<String, Map<String, String>>> expectedConfigurationsCapture = EasyMock.newCapture();
-
- configHelper.createConfigTypes(EasyMock.anyObject(Cluster.class),
- EasyMock.anyObject(AmbariManagementController.class),
- EasyMock.anyObject(StackId.class),
- EasyMock.capture(expectedConfigurationsCapture),
- EasyMock.anyObject(String.class), EasyMock.anyObject(String.class));
-
- EasyMock.expectLastCall().once();
-
- EasyMock.replay(configHelper, cluster, fooConfig, barConfig, bazConfig);
-
- Map<String, UpgradePack> upgradePacks = ambariMetaInfo.getUpgradePacks("HDP", "2.1.1");
- UpgradePack upgradePack = upgradePacks.get("upgrade_to_new_stack");
-
- UpgradeContext upgradeContext = EasyMock.createNiceMock(UpgradeContext.class);
- EasyMock.expect(upgradeContext.getAmbariMetaInfo()).andReturn(ambariMetaInfo).anyTimes();
- EasyMock.expect(upgradeContext.getCluster()).andReturn(cluster).anyTimes();
- EasyMock.expect(upgradeContext.getDirection()).andReturn(Direction.UPGRADE).anyTimes();
- EasyMock.expect(upgradeContext.getUpgradePack()).andReturn(upgradePack).anyTimes();
- EasyMock.expect(upgradeContext.getRepositoryVersion()).andReturn(repoVersion211).anyTimes();
- EasyMock.expect(upgradeContext.getTargetRepositoryVersion(EasyMock.anyString())).andReturn(repoVersion220).anyTimes();
-
- Map<String, Map<String, String>> expectedConfigurations = expectedConfigurationsCapture.getValue();
- Map<String, String> expectedFooType = expectedConfigurations.get("foo-site");
- Map<String, String> expectedBarType = expectedConfigurations.get("bar-site");
- Map<String, String> expectedBazType = expectedConfigurations.get("baz-site");
-
- // As the upgrade pack did not have any Flume updates, its configs should not be updated.
- assertFalse(expectedConfigurations.containsKey("flume-env"));
-
- // the really important values are one-new and three-changed; one-new
- // indicates that the new stack value is changed since it was not customized
- // while three-changed represents that the customized value was preserved
- // even though the stack value changed
- assertEquals("one-new", expectedFooType.get("1"));
- assertEquals("one-one", expectedFooType.get("11"));
- assertEquals("two", expectedBarType.get("2"));
- assertEquals("three-changed", expectedBazType.get("3"));
- }
-
- /**
* @param amc
* @return the provider
*/
http://git-wip-us.apache.org/repos/asf/ambari/blob/770c519a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
index f306d69..54b16a9 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java
@@ -18,7 +18,6 @@
package org.apache.ambari.server.serveraction.upgrades;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -47,12 +46,14 @@ import org.apache.ambari.server.controller.ServiceConfigVersionResponse;
import org.apache.ambari.server.orm.GuiceJpaInitializer;
import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
import org.apache.ambari.server.orm.OrmTestHelper;
+import org.apache.ambari.server.orm.dao.HostComponentStateDAO;
import org.apache.ambari.server.orm.dao.HostDAO;
import org.apache.ambari.server.orm.dao.HostVersionDAO;
import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
import org.apache.ambari.server.orm.dao.RequestDAO;
import org.apache.ambari.server.orm.dao.StackDAO;
import org.apache.ambari.server.orm.dao.UpgradeDAO;
+import org.apache.ambari.server.orm.entities.HostComponentStateEntity;
import org.apache.ambari.server.orm.entities.HostVersionEntity;
import org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
import org.apache.ambari.server.orm.entities.RequestEntity;
@@ -74,6 +75,7 @@ import org.apache.ambari.server.state.ServiceComponentHostFactory;
import org.apache.ambari.server.state.ServiceFactory;
import org.apache.ambari.server.state.StackId;
import org.apache.ambari.server.state.State;
+import org.apache.ambari.server.state.UpgradeState;
import org.apache.ambari.server.state.stack.UpgradePack;
import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
import org.apache.ambari.server.utils.EventBusSynchronizer;
@@ -139,6 +141,9 @@ public class UpgradeActionTest {
@Inject
private ConfigFactory configFactory;
+ @Inject
+ private HostComponentStateDAO hostComponentStateDAO;
+
private RepositoryVersionEntity repositoryVersion2110;
private RepositoryVersionEntity repositoryVersion2111;
private RepositoryVersionEntity repositoryVersion2201;
@@ -417,9 +422,29 @@ public class UpgradeActionTest {
finalizeUpgradeAction.setExecutionCommand(executionCommand);
finalizeUpgradeAction.setHostRoleCommand(hostRoleCommand);
+ // this should fail since the host versions have not moved to current
CommandReport report = finalizeUpgradeAction.execute(null);
- assertNotNull(report);
+ assertEquals(HostRoleStatus.FAILED.name(), report.getStatus());
+
+ List<HostVersionEntity> hostVersions = hostVersionDAO.findHostVersionByClusterAndRepository(
+ cluster.getClusterId(), repositoryVersion2111);
+
+ for (HostVersionEntity hostVersion : hostVersions) {
+ hostVersion.setState(RepositoryVersionState.CURRENT);
+ }
+
+ report = finalizeUpgradeAction.execute(null);
assertEquals(HostRoleStatus.COMPLETED.name(), report.getStatus());
+
+ hostVersions = hostVersionDAO.findHostVersionByClusterAndRepository(cluster.getClusterId(),
+ repositoryVersion2111);
+
+ for (HostVersionEntity hostVersion : hostVersions) {
+ Collection<HostComponentStateEntity> hostComponentStates = hostComponentStateDAO.findByHost(hostVersion.getHostName());
+ for (HostComponentStateEntity hostComponentStateEntity: hostComponentStates) {
+ assertEquals(UpgradeState.NONE, hostComponentStateEntity.getUpgradeState());
+ }
+ }
}
/**
@@ -472,218 +497,6 @@ public class UpgradeActionTest {
assertEquals(HostRoleStatus.COMPLETED.name(), report.getStatus());
}
- @Test
- public void testFinalizeUpgradeAcrossStacks() throws Exception {
- StackId sourceStack = HDP_21_STACK;
- StackId targetStack = HDP_22_STACK;
- String sourceRepo = HDP_2_1_1_0;
- String targetRepo = HDP_2_2_0_1;
- String hostName = "h1";
-
- makeCrossStackUpgradeClusterAndSourceRepo(sourceStack, sourceRepo, hostName);
- makeCrossStackUpgradeTargetRepo(targetStack, targetRepo, hostName);
-
- Cluster cluster = clusters.getCluster(clusterName);
-
- // setup the cluster for the upgrade across stacks
- cluster.setCurrentStackVersion(sourceStack);
- cluster.setDesiredStackVersion(targetStack);
-
- createUpgrade(cluster, repositoryVersion2201);
-
- Map<String, String> commandParams = new HashMap<>();
- ExecutionCommand executionCommand = new ExecutionCommand();
- executionCommand.setCommandParams(commandParams);
- executionCommand.setClusterName(clusterName);
-
- HostRoleCommand hostRoleCommand = hostRoleCommandFactory.create(null, null, null, null);
-
- hostRoleCommand.setExecutionCommandWrapper(new ExecutionCommandWrapper(executionCommand));
-
- finalizeUpgradeAction.setExecutionCommand(executionCommand);
- finalizeUpgradeAction.setHostRoleCommand(hostRoleCommand);
-
- CommandReport report = finalizeUpgradeAction.execute(null);
- assertNotNull(report);
- assertEquals(HostRoleStatus.COMPLETED.name(), report.getStatus());
-
- StackId currentStackId = cluster.getCurrentStackVersion();
- StackId desiredStackId = cluster.getDesiredStackVersion();
-
- // verify current/desired stacks are updated to the new stack
- assertEquals(desiredStackId, currentStackId);
- assertEquals(targetStack, currentStackId);
- assertEquals(targetStack, desiredStackId);
- }
-
- /**
- * Tests some of the action items are completed when finalizing downgrade
- * across stacks (HDP 2.2 -> HDP 2.3).
- *
- * @throws Exception
- */
- @Test
- public void testFinalizeDowngradeAcrossStacks() throws Exception {
- StackId sourceStack = HDP_21_STACK;
- StackId targetStack = HDP_22_STACK;
- String sourceRepo = HDP_2_1_1_0;
- String targetRepo = HDP_2_2_0_1;
- String hostName = "h1";
-
- makeCrossStackUpgradeClusterAndSourceRepo(sourceStack, sourceRepo, hostName);
- Cluster cluster = clusters.getCluster(clusterName);
-
- // install HDFS with some components
- Service service = installService(cluster, "HDFS");
- addServiceComponent(cluster, service, "NAMENODE");
- addServiceComponent(cluster, service, "DATANODE");
- createNewServiceComponentHost(cluster, "HDFS", "NAMENODE", "h1");
- createNewServiceComponentHost(cluster, "HDFS", "DATANODE", "h1");
-
- makeCrossStackUpgradeTargetRepo(targetStack, targetRepo, hostName);
-
- createUpgrade(cluster, repositoryVersion2201);
-
- // create some configs
- createConfigs(cluster);
-
- // setup the cluster for the upgrade across stacks
- cluster.setCurrentStackVersion(sourceStack);
- cluster.setDesiredStackVersion(targetStack);
-
- // now that the desired version is set, we can create some new configs in
- // the new stack version
- createConfigs(cluster);
-
- // verify we have configs in both HDP stacks
- cluster = clusters.getCluster(clusterName);
- Collection<Config> configs = cluster.getAllConfigs();
- assertEquals(8, configs.size());
-
- Map<String, String> commandParams = new HashMap<>();
- ExecutionCommand executionCommand = new ExecutionCommand();
- executionCommand.setCommandParams(commandParams);
- executionCommand.setClusterName(clusterName);
-
- HostRoleCommand hostRoleCommand = hostRoleCommandFactory.create(null, null, null, null);
-
- hostRoleCommand.setExecutionCommandWrapper(new ExecutionCommandWrapper(executionCommand));
-
- HostVersionDAO dao = m_injector.getInstance(HostVersionDAO.class);
-
- List<HostVersionEntity> hosts = dao.findByClusterStackAndVersion(clusterName, targetStack, targetRepo);
- assertFalse(hosts.isEmpty());
- for (HostVersionEntity hve : hosts) {
- assertTrue(hve.getState() == RepositoryVersionState.INSTALLED);
- }
-
- finalizeUpgradeAction.setExecutionCommand(executionCommand);
- finalizeUpgradeAction.setHostRoleCommand(hostRoleCommand);
-
- CommandReport report = finalizeUpgradeAction.execute(null);
- assertNotNull(report);
- assertEquals(HostRoleStatus.COMPLETED.name(), report.getStatus());
-
- StackId currentStackId = cluster.getCurrentStackVersion();
- StackId desiredStackId = cluster.getDesiredStackVersion();
-
- // verify current/desired stacks are back to normal
- assertEquals(desiredStackId, currentStackId);
- assertEquals(sourceStack, currentStackId);
- assertEquals(sourceStack, desiredStackId);
-
- // verify we have configs in only 1 stack
- cluster = clusters.getCluster(clusterName);
- configs = cluster.getAllConfigs();
- assertEquals(4, configs.size());
-
- hosts = dao.findByClusterStackAndVersion(clusterName, targetStack, targetRepo);
- assertFalse(hosts.isEmpty());
- for (HostVersionEntity hve : hosts) {
- assertTrue(hve.getState() == RepositoryVersionState.INSTALLED);
- }
- }
-
- /**
- * Tests that finalization can occur when the cluster state is
- * {@link RepositoryVersionState#UPGRADING} if all of the hosts and components
- * are reporting correct versions and states.
- *
- * @throws Exception
- */
- @Test
- public void testFinalizeUpgradeWithClusterStateInconsistencies() throws Exception {
- StackId sourceStack = HDP_21_STACK;
- StackId targetStack = HDP_22_STACK;
- String sourceRepo = HDP_2_1_1_0;
- String targetRepo = HDP_2_2_0_1;
- String hostName = "h1";
-
- makeCrossStackUpgradeClusterAndSourceRepo(sourceStack, sourceRepo, hostName);
-
- Cluster cluster = clusters.getCluster(clusterName);
-
- Service service = installService(cluster, "HDFS");
- addServiceComponent(cluster, service, "NAMENODE");
- addServiceComponent(cluster, service, "DATANODE");
- createNewServiceComponentHost(cluster, "HDFS", "NAMENODE", "h1");
- createNewServiceComponentHost(cluster, "HDFS", "DATANODE", "h1");
-
- makeCrossStackUpgradeTargetRepo(targetStack, targetRepo, hostName);
- // create some configs
- createConfigs(cluster);
-
- // setup the cluster for the upgrade across stacks
- cluster.setCurrentStackVersion(sourceStack);
- cluster.setDesiredStackVersion(targetStack);
-
- createUpgrade(cluster, repositoryVersion2201);
-
- // set the SCH versions to the new stack so that the finalize action is
- // happy
- cluster.getServiceComponentHosts("HDFS", "NAMENODE").get(0).setVersion(targetRepo);
- cluster.getServiceComponentHosts("HDFS", "DATANODE").get(0).setVersion(targetRepo);
-
- // inject an unhappy path where the cluster repo version is still UPGRADING
- // even though all of the hosts are UPGRADED
-
-
- // verify the conditions for the test are met properly
- List<HostVersionEntity> hostVersions = hostVersionDAO.findByClusterStackAndVersion(clusterName, HDP_22_STACK, targetRepo);
-
- assertTrue(hostVersions.size() > 0);
- for (HostVersionEntity hostVersion : hostVersions) {
- assertEquals(RepositoryVersionState.INSTALLED, hostVersion.getState());
- }
-
- // now finalize and ensure we can transition from UPGRADING to UPGRADED
- // automatically before CURRENT
- Map<String, String> commandParams = new HashMap<>();
- ExecutionCommand executionCommand = new ExecutionCommand();
- executionCommand.setCommandParams(commandParams);
- executionCommand.setClusterName(clusterName);
-
- HostRoleCommand hostRoleCommand = hostRoleCommandFactory.create(null, null, null, null);
-
- hostRoleCommand.setExecutionCommandWrapper(new ExecutionCommandWrapper(executionCommand));
-
- finalizeUpgradeAction.setExecutionCommand(executionCommand);
- finalizeUpgradeAction.setHostRoleCommand(hostRoleCommand);
-
- CommandReport report = finalizeUpgradeAction.execute(null);
- assertNotNull(report);
- assertEquals(HostRoleStatus.COMPLETED.name(), report.getStatus());
-
- StackId currentStackId = cluster.getCurrentStackVersion();
- StackId desiredStackId = cluster.getDesiredStackVersion();
-
- // verify current/desired stacks are updated to the new stack
- assertEquals(desiredStackId, currentStackId);
- assertEquals(targetStack, currentStackId);
- assertEquals(targetStack, desiredStackId);
- }
-
-
private ServiceComponentHost createNewServiceComponentHost(Cluster cluster, String svc,
String svcComponent, String hostName) throws AmbariException {
Assert.assertNotNull(cluster.getConfigGroups());
http://git-wip-us.apache.org/repos/asf/ambari/blob/770c519a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
index 24c529d..cab1c8d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java
@@ -17,7 +17,9 @@
*/
package org.apache.ambari.server.state;
+import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.replay;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -50,7 +52,10 @@ import org.apache.ambari.server.controller.ConfigurationRequest;
import org.apache.ambari.server.orm.GuiceJpaInitializer;
import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
import org.apache.ambari.server.orm.OrmTestHelper;
+import org.apache.ambari.server.orm.dao.ServiceConfigDAO;
+import org.apache.ambari.server.orm.entities.ClusterConfigEntity;
import org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
+import org.apache.ambari.server.orm.entities.ServiceConfigEntity;
import org.apache.ambari.server.security.TestAuthenticationFactory;
import org.apache.ambari.server.security.authorization.AuthorizationException;
import org.apache.ambari.server.stack.HostsType;
@@ -80,6 +85,7 @@ import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
import org.apache.ambari.server.utils.EventBusSynchronizer;
import org.easymock.Capture;
import org.easymock.EasyMock;
+import org.easymock.EasyMockSupport;
import org.easymock.IAnswer;
import org.junit.After;
import org.junit.Before;
@@ -94,13 +100,14 @@ import com.google.inject.Binder;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
+import com.google.inject.Provider;
import com.google.inject.assistedinject.FactoryModuleBuilder;
import com.google.inject.util.Modules;
/**
* Tests the {@link UpgradeHelper} class
*/
-public class UpgradeHelperTest {
+public class UpgradeHelperTest extends EasyMockSupport {
private static final StackId STACK_ID_HDP_211 = new StackId("HDP-2.1.1");
private static final StackId STACK_ID_HDP_220 = new StackId("HDP-2.2.0");
@@ -460,7 +467,7 @@ public class UpgradeHelperTest {
// use a "real" master host resolver here so that we can actually test MM
MasterHostResolver masterHostResolver = new MasterHostResolver(cluster, null, context);
- EasyMock.expect(context.getResolver()).andReturn(masterHostResolver).anyTimes();
+ expect(context.getResolver()).andReturn(masterHostResolver).anyTimes();
replay(context);
List<UpgradeGroupHolder> groups = m_upgradeHelper.createSequence(upgrade, context);
@@ -1560,7 +1567,7 @@ public class UpgradeHelperTest {
UpgradeType.HOST_ORDERED, repositoryVersion2110);
MasterHostResolver resolver = new MasterHostResolver(c, m_configHelper, context);
- EasyMock.expect(context.getResolver()).andReturn(resolver).anyTimes();
+ expect(context.getResolver()).andReturn(resolver).anyTimes();
replay(context);
HostsType ht = resolver.getMasterAndHosts("ZOOKEEPER", "ZOOKEEPER_SERVER");
@@ -1635,7 +1642,7 @@ public class UpgradeHelperTest {
// use a "real" master host resolver here so that we can actually test MM
MasterHostResolver mhr = new MockMasterHostResolver(c, m_configHelper, context);
- EasyMock.expect(context.getResolver()).andReturn(mhr).anyTimes();
+ expect(context.getResolver()).andReturn(mhr).anyTimes();
replay(context);
@@ -1704,7 +1711,7 @@ public class UpgradeHelperTest {
// use a "real" master host resolver here so that we can actually test MM
MasterHostResolver mhr = new BadMasterHostResolver(c, m_configHelper, context);
- EasyMock.expect(context.getResolver()).andReturn(mhr).anyTimes();
+ expect(context.getResolver()).andReturn(mhr).anyTimes();
replay(context);
HostsType ht = mhr.getMasterAndHosts("HDFS", "NAMENODE");
@@ -1842,7 +1849,7 @@ public class UpgradeHelperTest {
// use a "real" master host resolver here so that we can actually test MM
MasterHostResolver masterHostResolver = new MasterHostResolver(c, m_configHelper, context);
- EasyMock.expect(context.getResolver()).andReturn(masterHostResolver).anyTimes();
+ expect(context.getResolver()).andReturn(masterHostResolver).anyTimes();
replay(context);
List<UpgradeGroupHolder> groups = m_upgradeHelper.createSequence(upgradePack, context);
@@ -1858,7 +1865,7 @@ public class UpgradeHelperTest {
// use a "real" master host resolver here so that we can actually test MM
masterHostResolver = new MasterHostResolver(c, m_configHelper, context);
- EasyMock.expect(context.getResolver()).andReturn(masterHostResolver).anyTimes();
+ expect(context.getResolver()).andReturn(masterHostResolver).anyTimes();
replay(context);
groups = m_upgradeHelper.createSequence(upgradePack, context);
@@ -2124,7 +2131,7 @@ public class UpgradeHelperTest {
UpgradeType.HOST_ORDERED, repoVersion220);
MasterHostResolver resolver = new MasterHostResolver(c, m_configHelper, context);
- EasyMock.expect(context.getResolver()).andReturn(resolver).anyTimes();
+ expect(context.getResolver()).andReturn(resolver).anyTimes();
replay(context);
@@ -2168,7 +2175,7 @@ public class UpgradeHelperTest {
repoVersion211);
resolver = new MasterHostResolver(c, m_configHelper, context);
- EasyMock.expect(context.getResolver()).andReturn(resolver).anyTimes();
+ expect(context.getResolver()).andReturn(resolver).anyTimes();
replay(context);
groups = m_upgradeHelper.createSequence(upgradePack, context);
@@ -2185,7 +2192,7 @@ public class UpgradeHelperTest {
repoVersion211);
resolver = new MasterHostResolver(c, m_configHelper, context);
- EasyMock.expect(context.getResolver()).andReturn(resolver).anyTimes();
+ expect(context.getResolver()).andReturn(resolver).anyTimes();
replay(context);
groups = m_upgradeHelper.createSequence(upgradePack, context);
@@ -2243,6 +2250,182 @@ public class UpgradeHelperTest {
}
/**
+ * Tests merging configurations between existing and new stack values on
+ * upgrade.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testMergeConfigurations() throws Exception {
+ RepositoryVersionEntity repoVersion211 = createNiceMock(RepositoryVersionEntity.class);
+ RepositoryVersionEntity repoVersion220 = createNiceMock(RepositoryVersionEntity.class);
+
+ StackId stack211 = new StackId("HDP-2.1.1");
+ StackId stack220 = new StackId("HDP-2.2.0");
+
+ String version211 = "2.1.1.0-1234";
+ String version220 = "2.2.0.0-1234";
+
+ expect(repoVersion211.getStackId()).andReturn(stack211).atLeastOnce();
+ expect(repoVersion211.getVersion()).andReturn(version211).atLeastOnce();
+
+ expect(repoVersion220.getStackId()).andReturn(stack220).atLeastOnce();
+ expect(repoVersion220.getVersion()).andReturn(version220).atLeastOnce();
+
+ Map<String, Map<String, String>> stack211Configs = new HashMap<>();
+ Map<String, String> stack211FooType = new HashMap<>();
+ Map<String, String> stack211BarType = new HashMap<>();
+ Map<String, String> stack211BazType = new HashMap<>();
+ stack211Configs.put("foo-site", stack211FooType);
+ stack211Configs.put("bar-site", stack211BarType);
+ stack211Configs.put("baz-site", stack211BazType);
+ stack211FooType.put("1", "one");
+ stack211FooType.put("1A", "one-A");
+ stack211BarType.put("2", "two");
+ stack211BazType.put("3", "three");
+
+ Map<String, Map<String, String>> stack220Configs = new HashMap<>();
+ Map<String, String> stack220FooType = new HashMap<>();
+ Map<String, String> stack220BazType = new HashMap<>();
+ stack220Configs.put("foo-site", stack220FooType);
+ stack220Configs.put("baz-site", stack220BazType);
+ stack220FooType.put("1", "one-new");
+ stack220FooType.put("1A1", "one-A-one");
+ stack220BazType.put("3", "three-new");
+
+ Map<String, String> existingFooType = new HashMap<>();
+ Map<String, String> existingBarType = new HashMap<>();
+ Map<String, String> existingBazType = new HashMap<>();
+
+ ClusterConfigEntity fooConfigEntity = createNiceMock(ClusterConfigEntity.class);
+ ClusterConfigEntity barConfigEntity = createNiceMock(ClusterConfigEntity.class);
+ ClusterConfigEntity bazConfigEntity = createNiceMock(ClusterConfigEntity.class);
+
+ expect(fooConfigEntity.getType()).andReturn("foo-site");
+ expect(barConfigEntity.getType()).andReturn("bar-site");
+ expect(bazConfigEntity.getType()).andReturn("baz-site");
+
+ Config fooConfig = createNiceMock(Config.class);
+ Config barConfig = createNiceMock(Config.class);
+ Config bazConfig = createNiceMock(Config.class);
+
+ existingFooType.put("1", "one");
+ existingFooType.put("1A", "one-A");
+ existingBarType.put("2", "two");
+ existingBazType.put("3", "three-changed");
+
+ expect(fooConfig.getType()).andReturn("foo-site").atLeastOnce();
+ expect(barConfig.getType()).andReturn("bar-site").atLeastOnce();
+ expect(bazConfig.getType()).andReturn("baz-site").atLeastOnce();
+ expect(fooConfig.getProperties()).andReturn(existingFooType);
+ expect(barConfig.getProperties()).andReturn(existingBarType);
+ expect(bazConfig.getProperties()).andReturn(existingBazType);
+
+ Map<String, DesiredConfig> desiredConfigurations = new HashMap<>();
+ desiredConfigurations.put("foo-site", null);
+ desiredConfigurations.put("bar-site", null);
+ desiredConfigurations.put("baz-site", null);
+
+ Service zookeeper = createNiceMock(Service.class);
+ expect(zookeeper.getName()).andReturn("ZOOKEEPER").atLeastOnce();
+ expect(zookeeper.getServiceComponents()).andReturn(
+ new HashMap<String, ServiceComponent>()).once();
+ zookeeper.setDesiredRepositoryVersion(repoVersion220);
+ expectLastCall().once();
+
+ Cluster cluster = createNiceMock(Cluster.class);
+ expect(cluster.getCurrentStackVersion()).andReturn(stack211).atLeastOnce();
+ expect(cluster.getDesiredStackVersion()).andReturn(stack220);
+ expect(cluster.getDesiredConfigs()).andReturn(desiredConfigurations);
+ expect(cluster.getDesiredConfigByType("foo-site")).andReturn(fooConfig);
+ expect(cluster.getDesiredConfigByType("bar-site")).andReturn(barConfig);
+ expect(cluster.getDesiredConfigByType("baz-site")).andReturn(bazConfig);
+ expect(cluster.getService("ZOOKEEPER")).andReturn(zookeeper);
+ expect(cluster.getDesiredConfigByType("foo-type")).andReturn(fooConfig);
+ expect(cluster.getDesiredConfigByType("bar-type")).andReturn(barConfig);
+ expect(cluster.getDesiredConfigByType("baz-type")).andReturn(bazConfig);
+
+ // setup the config helper for placeholder resolution
+ @SuppressWarnings("unchecked")
+ Provider<ConfigHelper> configHelperProvider = EasyMock.createNiceMock(Provider.class);
+ ConfigHelper configHelper = EasyMock.createNiceMock(ConfigHelper.class);
+
+ expect(configHelperProvider.get()).andStubReturn(configHelper);
+
+ expect(configHelper.getDefaultProperties(stack211, "ZOOKEEPER")).andReturn(
+ stack211Configs).anyTimes();
+
+ expect(configHelper.getDefaultProperties(stack220, "ZOOKEEPER")).andReturn(
+ stack220Configs).anyTimes();
+
+ Capture<Map<String, Map<String, String>>> expectedConfigurationsCapture = EasyMock.newCapture();
+
+ configHelper.createConfigTypes(EasyMock.anyObject(Cluster.class),
+ EasyMock.anyObject(AmbariManagementController.class), EasyMock.anyObject(StackId.class),
+ EasyMock.capture(expectedConfigurationsCapture), EasyMock.anyObject(String.class),
+ EasyMock.anyObject(String.class));
+
+ expectLastCall().once();
+ EasyMock.replay(configHelperProvider, configHelper);
+
+ // mock the service config DAO and replay it
+ ServiceConfigEntity zookeeperServiceConfig = createNiceMock(ServiceConfigEntity.class);
+ expect(zookeeperServiceConfig.getClusterConfigEntities()).andReturn(
+ Lists.newArrayList(fooConfigEntity, barConfigEntity, bazConfigEntity));
+
+ ServiceConfigDAO serviceConfigDAOMock;
+ serviceConfigDAOMock = EasyMock.createNiceMock(ServiceConfigDAO.class);
+
+ List<ServiceConfigEntity> latestServiceConfigs = Lists.newArrayList(zookeeperServiceConfig);
+ expect(serviceConfigDAOMock.getLastServiceConfigsForService(EasyMock.anyLong(),
+ eq("ZOOKEEPER"))).andReturn(latestServiceConfigs).once();
+
+ replay(serviceConfigDAOMock);
+
+ Map<String, UpgradePack> upgradePacks = ambariMetaInfo.getUpgradePacks("HDP", "2.1.1");
+ UpgradePack upgradePack = upgradePacks.get("upgrade_to_new_stack");
+
+ UpgradeContext context = createNiceMock(UpgradeContext.class);
+ expect(context.getCluster()).andReturn(cluster).atLeastOnce();
+ expect(context.getType()).andReturn(UpgradeType.ROLLING).atLeastOnce();
+ expect(context.getDirection()).andReturn(Direction.UPGRADE).atLeastOnce();
+ expect(context.getRepositoryVersion()).andReturn(repoVersion220).anyTimes();
+ expect(context.getSupportedServices()).andReturn(Sets.newHashSet("ZOOKEEPER")).atLeastOnce();
+ expect(context.getSourceRepositoryVersion(EasyMock.anyString())).andReturn(repoVersion211).atLeastOnce();
+ expect(context.getTargetRepositoryVersion(EasyMock.anyString())).andReturn(repoVersion220).atLeastOnce();
+ expect(context.getRepositoryType()).andReturn(RepositoryType.STANDARD).anyTimes();
+ expect(context.getAmbariMetaInfo()).andReturn(ambariMetaInfo).anyTimes();
+ expect(context.getHostRoleCommandFactory()).andStubReturn(injector.getInstance(HostRoleCommandFactory.class));
+ expect(context.getRoleGraphFactory()).andStubReturn(injector.getInstance(RoleGraphFactory.class));
+ expect(context.getUpgradePack()).andReturn(upgradePack).atLeastOnce();
+
+ replayAll();
+
+ UpgradeHelper upgradeHelper = injector.getInstance(UpgradeHelper.class);
+ upgradeHelper.m_serviceConfigDAO = serviceConfigDAOMock;
+ upgradeHelper.m_configHelperProvider = configHelperProvider;
+ upgradeHelper.updateDesiredRepositoriesAndConfigs(context);
+
+ Map<String, Map<String, String>> expectedConfigurations = expectedConfigurationsCapture.getValue();
+ Map<String, String> expectedFooType = expectedConfigurations.get("foo-site");
+ Map<String, String> expectedBarType = expectedConfigurations.get("bar-site");
+ Map<String, String> expectedBazType = expectedConfigurations.get("baz-site");
+
+ // As the upgrade pack did not have any Flume updates, its configs should
+ // not be updated.
+ assertEquals(3, expectedConfigurations.size());
+
+ // the really important values are one-new and three-changed; one-new
+ // indicates that the new stack value is changed since it was not customized
+ // while three-changed represents that the customized value was preserved
+ // even though the stack value changed
+ assertEquals("one-new", expectedFooType.get("1"));
+ assertEquals("one-A", expectedFooType.get("1A"));
+ assertEquals("two", expectedBarType.get("2"));
+ assertEquals("three-changed", expectedBazType.get("3"));
+ }
+
+ /**
* @param cluster
* @param direction
* @param type
@@ -2304,19 +2487,21 @@ public class UpgradeHelperTest {
UpgradeType type, RepositoryVersionEntity repositoryVersion, final RepositoryType repositoryType,
Set<String> services, MasterHostResolver resolver, boolean replay) {
UpgradeContext context = EasyMock.createNiceMock(UpgradeContext.class);
- EasyMock.expect(context.getCluster()).andReturn(cluster).anyTimes();
- EasyMock.expect(context.getType()).andReturn(type).anyTimes();
- EasyMock.expect(context.getDirection()).andReturn(direction).anyTimes();
- EasyMock.expect(context.getRepositoryVersion()).andReturn(repositoryVersion).anyTimes();
- EasyMock.expect(context.getSupportedServices()).andReturn(services).anyTimes();
- EasyMock.expect(context.getRepositoryType()).andReturn(repositoryType).anyTimes();
- EasyMock.expect(context.getAmbariMetaInfo()).andReturn(ambariMetaInfo).anyTimes();
- EasyMock.expect(context.getHostRoleCommandFactory()).andStubReturn(injector.getInstance(HostRoleCommandFactory.class));
- EasyMock.expect(context.getRoleGraphFactory()).andStubReturn(injector.getInstance(RoleGraphFactory.class));
+ expect(context.getCluster()).andReturn(cluster).anyTimes();
+ expect(context.getType()).andReturn(type).anyTimes();
+ expect(context.getDirection()).andReturn(direction).anyTimes();
+ expect(context.getRepositoryVersion()).andReturn(repositoryVersion).anyTimes();
+ expect(context.getSupportedServices()).andReturn(services).anyTimes();
+ expect(context.getRepositoryType()).andReturn(repositoryType).anyTimes();
+ expect(context.getAmbariMetaInfo()).andReturn(ambariMetaInfo).anyTimes();
+ expect(context.getHostRoleCommandFactory()).andStubReturn(
+ injector.getInstance(HostRoleCommandFactory.class));
+ expect(context.getRoleGraphFactory()).andStubReturn(
+ injector.getInstance(RoleGraphFactory.class));
// only set this if supplied
if (null != resolver) {
- EasyMock.expect(context.getResolver()).andReturn(resolver).anyTimes();
+ expect(context.getResolver()).andReturn(resolver).anyTimes();
}
final Map<String, RepositoryVersionEntity> targetRepositoryVersions = new HashMap<>();
@@ -2325,7 +2510,7 @@ public class UpgradeHelperTest {
}
final Capture<String> repoVersionServiceName = EasyMock.newCapture();
- EasyMock.expect(
+ expect(
context.getTargetRepositoryVersion(EasyMock.capture(repoVersionServiceName))).andAnswer(
new IAnswer<RepositoryVersionEntity>() {
@Override
@@ -2335,7 +2520,7 @@ public class UpgradeHelperTest {
}).anyTimes();
final Capture<String> serviceNameSupported = EasyMock.newCapture();
- EasyMock.expect(context.isServiceSupported(EasyMock.capture(serviceNameSupported))).andAnswer(
+ expect(context.isServiceSupported(EasyMock.capture(serviceNameSupported))).andAnswer(
new IAnswer<Boolean>() {
@Override
public Boolean answer() {
@@ -2349,7 +2534,7 @@ public class UpgradeHelperTest {
final Capture<String> serviceDisplayNameArg2 = EasyMock.newCapture();
context.setServiceDisplay(EasyMock.capture(serviceDisplayNameArg1), EasyMock.capture(serviceDisplayNameArg2));
- EasyMock.expectLastCall().andAnswer(
+ expectLastCall().andAnswer(
new IAnswer<Object>() {
@Override
public Object answer() {
@@ -2367,7 +2552,7 @@ public class UpgradeHelperTest {
context.setComponentDisplay(EasyMock.capture(componentDisplayNameArg1),
EasyMock.capture(componentDisplayNameArg2), EasyMock.capture(componentDisplayNameArg3));
- EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
+ expectLastCall().andAnswer(new IAnswer<Object>() {
@Override
public Object answer() {
componentNames.put(
@@ -2378,7 +2563,7 @@ public class UpgradeHelperTest {
}).anyTimes();
final Capture<String> getServiceDisplayArgument1 = EasyMock.newCapture();
- EasyMock.expect(
+ expect(
context.getServiceDisplay(EasyMock.capture(getServiceDisplayArgument1))).andAnswer(
new IAnswer<String>() {
@Override
@@ -2389,7 +2574,7 @@ public class UpgradeHelperTest {
final Capture<String> getComponentDisplayArgument1 = EasyMock.newCapture();
final Capture<String> getComponentDisplayArgument2 = EasyMock.newCapture();
- EasyMock.expect(context.getComponentDisplay(EasyMock.capture(getComponentDisplayArgument1),
+ expect(context.getComponentDisplay(EasyMock.capture(getComponentDisplayArgument1),
EasyMock.capture(getComponentDisplayArgument2))).andAnswer(new IAnswer<String>() {
@Override
public String answer() {
@@ -2399,7 +2584,7 @@ public class UpgradeHelperTest {
}).anyTimes();
final Capture<UpgradeScope> isScopedCapture = EasyMock.newCapture();
- EasyMock.expect(context.isScoped(EasyMock.capture(isScopedCapture))).andStubAnswer(
+ expect(context.isScoped(EasyMock.capture(isScopedCapture))).andStubAnswer(
new IAnswer<Boolean>() {
@Override
public Boolean answer() throws Throwable {
[4/4] ambari git commit: AMBARI-21114 - Fix Unit Test Failures From
Prior Patch/Service Upgrade Commits (jonathanhurley)
Posted by jo...@apache.org.
AMBARI-21114 - Fix Unit Test Failures From Prior Patch/Service Upgrade Commits (jonathanhurley)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/770c519a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/770c519a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/770c519a
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 770c519a9f6c9647c812837c61662e42af5e37d5
Parents: 2cfc8d2
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Wed May 24 14:26:46 2017 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Wed May 24 16:11:04 2017 -0400
----------------------------------------------------------------------
ambari-server/docs/api/generated/index.html | 42516 ++++++++++++++++-
ambari-server/docs/api/generated/swagger.json | 8762 +++-
.../ambari/server/state/UpgradeHelper.java | 4 +-
.../StackUpgradeConfigurationMergeTest.java | 274 +-
.../internal/UpgradeResourceProviderTest.java | 193 +-
.../upgrades/UpgradeActionTest.java | 241 +-
.../ambari/server/state/UpgradeHelperTest.java | 239 +-
7 files changed, 48934 insertions(+), 3295 deletions(-)
----------------------------------------------------------------------
[3/4] ambari git commit: AMBARI-21114 - Fix Unit Test Failures From
Prior Patch/Service Upgrade Commits (jonathanhurley)
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/770c519a/ambari-server/docs/api/generated/index.html
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/generated/index.html b/ambari-server/docs/api/generated/index.html
index 1771346..7ea4297 100644
--- a/ambari-server/docs/api/generated/index.html
+++ b/ambari-server/docs/api/generated/index.html
@@ -710,6 +710,80 @@ margin-bottom: 20px;
<script>
// Script section to load models into a JS Var
var defs = {}
+ defs.ActionRequest = {
+ "type" : "object",
+ "properties" : {
+ "action_name" : {
+ "type" : "string"
+ },
+ "action_type" : {
+ "type" : "string"
+ },
+ "inputs" : {
+ "type" : "string"
+ },
+ "target_service" : {
+ "type" : "string"
+ },
+ "target_component" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "target_type" : {
+ "type" : "string"
+ },
+ "default_timeout" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ActionRequestSwagger = {
+ "type" : "object",
+ "properties" : {
+ "Actions" : {
+ "$ref" : "#/definitions/ActionRequest"
+ }
+ }
+};
+ defs.ActionResponse = {
+ "type" : "object",
+ "properties" : {
+ "action_name" : {
+ "type" : "string"
+ },
+ "action_type" : {
+ "type" : "string"
+ },
+ "inputs" : {
+ "type" : "string"
+ },
+ "target_service" : {
+ "type" : "string"
+ },
+ "target_component" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "target_type" : {
+ "type" : "string"
+ },
+ "default_timeout" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ActionResponseSwagger = {
+ "type" : "object",
+ "properties" : {
+ "Actions" : {
+ "$ref" : "#/definitions/ActionResponse"
+ }
+ }
+};
defs.ActiveWidgetLayoutRequest = {
"type" : "object",
"properties" : {
@@ -753,489 +827,728 @@ margin-bottom: 20px;
}
}
};
- defs.GroupPrivilegeResponse = {
+ defs.AgentEnv = {
"type" : "object",
- "required" : [ "PrivilegeInfo/group_name" ],
"properties" : {
- "PrivilegeInfo/permission_label" : {
- "type" : "string"
+ "stackFoldersAndFiles" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Directory"
+ }
},
- "PrivilegeInfo/privilege_id" : {
+ "alternatives" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Alternative"
+ }
+ },
+ "existingUsers" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ExistingUser"
+ }
+ },
+ "existingRepos" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "installedPackages" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/PackageDetail"
+ }
+ },
+ "hostHealth" : {
+ "$ref" : "#/definitions/HostHealth"
+ },
+ "umask" : {
"type" : "integer",
"format" : "int32"
},
- "PrivilegeInfo/permission_name" : {
+ "transparentHugePage" : {
"type" : "string"
},
- "PrivilegeInfo/principal_type" : {
- "type" : "string",
- "enum" : [ "USER", "GROUP", "ROLE" ]
+ "firewallRunning" : {
+ "type" : "boolean",
+ "default" : false
},
- "PrivilegeInfo/principal_name" : {
+ "firewallName" : {
"type" : "string"
},
- "PrivilegeInfo/type" : {
- "type" : "string",
- "enum" : [ "AMBARI", "CLUSTER", "VIEW" ]
+ "hasUnlimitedJcePolicy" : {
+ "type" : "boolean",
+ "default" : false
},
- "PrivilegeInfo/cluster_name" : {
+ "reverseLookup" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.Alternative = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
"type" : "string"
},
- "PrivilegeInfo/view_name" : {
+ "target" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.Artifacts = {
+ "type" : "object",
+ "properties" : {
+ "stack_name" : {
"type" : "string"
},
- "PrivilegeInfo/version" : {
+ "stack_version" : {
"type" : "string"
},
- "PrivilegeInfo/instance_name" : {
+ "artifact_name" : {
"type" : "string"
},
- "PrivilegeInfo/group_name" : {
+ "service_name" : {
"type" : "string"
}
}
};
- defs.GroupRequest = {
+ defs.BlueprintInfo = {
"type" : "object",
- "required" : [ "Groups/group_name" ],
"properties" : {
- "Groups/group_name" : {
+ "security" : {
+ "$ref" : "#/definitions/SecurityInfo"
+ },
+ "stack_name" : {
+ "type" : "string"
+ },
+ "stack_version" : {
+ "type" : "string"
+ },
+ "blueprint_name" : {
"type" : "string"
}
}
};
- defs.GroupResponse = {
+ defs.BlueprintSwagger = {
"type" : "object",
"properties" : {
- "Groups/group_name" : {
- "type" : "string"
+ "configurations" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ }
},
- "Groups/ldap_group" : {
- "type" : "boolean",
- "default" : false
+ "Blueprints" : {
+ "$ref" : "#/definitions/BlueprintInfo"
},
- "Groups/group_type" : {
- "type" : "string",
- "enum" : [ "LOCAL", "LDAP", "JWT", "PAM" ]
+ "host_groups" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/HostGroupInfo"
+ }
}
}
};
- defs.MemberRequest = {
+ defs.Body = {
"type" : "object",
- "required" : [ "MemberInfo/group_name", "MemberInfo/user_name" ],
"properties" : {
- "MemberInfo/group_name" : {
- "type" : "string"
- },
- "MemberInfo/user_name" : {
- "type" : "string"
+ "Requests" : {
+ "$ref" : "#/definitions/Request"
}
}
};
- defs.MemberResponse = {
+ defs.Check = {
"type" : "object",
"properties" : {
- "MemberInfo/group_name" : {
+ "property" : {
"type" : "string"
},
- "MemberInfo/user_name" : {
+ "desired" : {
+ "type" : "string"
+ },
+ "site" : {
"type" : "string"
}
}
};
- defs.ParameterConfig = {
+ defs.ClusterArtifactRequest = {
"type" : "object",
"properties" : {
- "name" : {
- "type" : "string"
+ "Artifacts" : {
+ "$ref" : "#/definitions/ClusterArtifactRequestInfo"
},
- "description" : {
+ "artifact_data" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ }
+ }
+};
+ defs.ClusterArtifactRequestInfo = {
+ "type" : "object",
+ "properties" : {
+ "artifact_name" : {
"type" : "string"
+ }
+ }
+};
+ defs.ClusterArtifactResponse = {
+ "type" : "object",
+ "properties" : {
+ "Artifacts" : {
+ "$ref" : "#/definitions/ClusterArtifactResponseInfo"
},
- "label" : {
+ "artifact_data" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ }
+ }
+};
+ defs.ClusterArtifactResponseInfo = {
+ "type" : "object",
+ "properties" : {
+ "cluster_name" : {
"type" : "string"
},
- "placeholder" : {
+ "artifact_name" : {
"type" : "string"
- },
- "defaultValue" : {
- "type" : "string",
- "xml" : {
- "name" : "default-value"
- }
- },
- "clusterConfig" : {
- "type" : "string",
- "xml" : {
- "name" : "cluster-config"
- }
- },
- "required" : {
- "type" : "boolean",
- "default" : false
- },
- "masked" : {
- "type" : "boolean",
- "default" : false
}
}
};
- defs.PrivilegeResponse = {
+ defs.ClusterHealthReport = {
"type" : "object",
"properties" : {
- "PrivilegeInfo/permission_label" : {
- "type" : "string"
+ "Host/stale_config" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "PrivilegeInfo/privilege_id" : {
+ "Host/maintenance_state" : {
"type" : "integer",
"format" : "int32"
},
- "PrivilegeInfo/permission_name" : {
- "type" : "string"
+ "Host/host_state/HEALTHY" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "PrivilegeInfo/principal_type" : {
- "type" : "string",
- "enum" : [ "USER", "GROUP", "ROLE" ]
+ "Host/host_state/UNHEALTHY" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "PrivilegeInfo/principal_name" : {
- "type" : "string"
+ "Host/host_state/HEARTBEAT_LOST" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "PrivilegeInfo/type" : {
- "type" : "string",
- "enum" : [ "AMBARI", "CLUSTER", "VIEW" ]
+ "Host/host_state/INIT" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "PrivilegeInfo/cluster_name" : {
- "type" : "string"
+ "Host/host_status/HEALTHY" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "PrivilegeInfo/view_name" : {
- "type" : "string"
+ "Host/host_status/UNHEALTHY" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "PrivilegeInfo/version" : {
- "type" : "string"
+ "Host/host_status/UNKNOWN" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "PrivilegeInfo/instance_name" : {
- "type" : "string"
+ "Host/host_status/ALERT" : {
+ "type" : "integer",
+ "format" : "int32"
}
}
};
- defs.UserAuthorizationResponse = {
+ defs.ClusterRequest = {
"type" : "object",
- "required" : [ "AuthorizationInfo/user_name" ],
"properties" : {
- "AuthorizationInfo/authorization_id" : {
- "type" : "string"
+ "cluster_id" : {
+ "type" : "integer",
+ "format" : "int64"
},
- "AuthorizationInfo/authorization_name" : {
+ "cluster_name" : {
"type" : "string"
},
- "AuthorizationInfo/resource_type" : {
+ "version" : {
"type" : "string"
},
- "AuthorizationInfo/user_name" : {
+ "provisioning_state" : {
"type" : "string"
},
- "AuthorizationInfo/cluster_name" : {
- "type" : "string"
+ "security_type" : {
+ "type" : "string",
+ "enum" : [ "NONE", "KERBEROS" ]
},
- "AuthorizationInfo/view_name" : {
- "type" : "string"
+ "desired_service_config_versions" : {
+ "$ref" : "#/definitions/ServiceConfigVersionRequest"
},
- "AuthorizationInfo/view_version" : {
+ "repository_version" : {
"type" : "string"
},
- "AuthorizationInfo/view_instance_name" : {
- "type" : "string"
- }
- }
+ "desired_configs" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ConfigurationRequest"
+ }
+ }
+ }
};
- defs.UserPrivilegeResponse = {
+ defs.ClusterRequestSwagger = {
"type" : "object",
- "required" : [ "PrivilegeInfo/user_name" ],
"properties" : {
- "PrivilegeInfo/permission_label" : {
- "type" : "string"
- },
- "PrivilegeInfo/privilege_id" : {
+ "Clusters" : {
+ "$ref" : "#/definitions/ClusterRequest"
+ }
+ }
+};
+ defs.ClusterResponse = {
+ "type" : "object",
+ "properties" : {
+ "cluster_id" : {
"type" : "integer",
- "format" : "int32"
+ "format" : "int64"
},
- "PrivilegeInfo/permission_name" : {
+ "cluster_name" : {
"type" : "string"
},
- "PrivilegeInfo/principal_type" : {
- "type" : "string",
- "enum" : [ "USER", "GROUP", "ROLE" ]
- },
- "PrivilegeInfo/principal_name" : {
+ "version" : {
"type" : "string"
},
- "PrivilegeInfo/type" : {
+ "provisioning_state" : {
"type" : "string",
- "enum" : [ "AMBARI", "CLUSTER", "VIEW" ]
+ "enum" : [ "INIT", "INSTALLING", "INSTALL_FAILED", "INSTALLED", "STARTING", "STARTED", "STOPPING", "UNINSTALLING", "UNINSTALLED", "WIPING_OUT", "UPGRADING", "DISABLED", "UNKNOWN" ]
},
- "PrivilegeInfo/cluster_name" : {
- "type" : "string"
+ "security_type" : {
+ "type" : "string",
+ "enum" : [ "NONE", "KERBEROS" ]
},
- "PrivilegeInfo/view_name" : {
- "type" : "string"
+ "total_hosts" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "PrivilegeInfo/version" : {
- "type" : "string"
+ "desired_configs" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/DesiredConfig"
+ }
},
- "PrivilegeInfo/instance_name" : {
- "type" : "string"
+ "desired_service_config_versions" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ServiceConfigVersionResponse"
+ }
+ }
},
- "PrivilegeInfo/user_name" : {
- "type" : "string"
+ "health_report" : {
+ "$ref" : "#/definitions/ClusterHealthReport"
+ },
+ "credential_store_properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
}
}
};
- defs.UserRequest = {
+ defs.ClusterResponseWrapper = {
"type" : "object",
"properties" : {
- "Users/password" : {
- "type" : "string"
- },
- "Users/old_password" : {
- "type" : "string"
- },
- "Users/active" : {
- "type" : "boolean",
- "default" : false
- },
- "Users/admin" : {
- "type" : "boolean",
- "default" : false
+ "Clusters" : {
+ "$ref" : "#/definitions/ClusterResponse"
}
}
};
- defs.UserResponse = {
+ defs.ClusterServiceArtifactRequest = {
"type" : "object",
- "required" : [ "Users/user_name" ],
"properties" : {
- "Users/user_type" : {
- "type" : "string",
- "enum" : [ "LOCAL", "LDAP", "JWT", "PAM" ]
+ "Artifacts" : {
+ "$ref" : "#/definitions/ClusterServiceArtifactRequestInfo"
},
- "Users/groups" : {
- "type" : "array",
- "uniqueItems" : true,
- "items" : {
- "type" : "string"
+ "artifact_data" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
}
- },
- "Users/user_name" : {
+ }
+ }
+};
+ defs.ClusterServiceArtifactRequestInfo = {
+ "type" : "object",
+ "properties" : {
+ "artifact_name" : {
"type" : "string"
- },
- "Users/active" : {
- "type" : "boolean",
- "default" : false
- },
- "Users/admin" : {
- "type" : "boolean",
- "default" : false
- },
- "Users/ldap_user" : {
- "type" : "boolean",
- "default" : false
}
}
};
- defs.ValidationResult = {
+ defs.ClusterServiceArtifactResponse = {
"type" : "object",
"properties" : {
- "valid" : {
- "type" : "boolean",
- "default" : false
+ "Artifacts" : {
+ "$ref" : "#/definitions/ClusterServiceArtifactResponseInfo"
},
- "detail" : {
- "type" : "string"
+ "artifact_data" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
}
}
};
- defs.ViewInfo = {
+ defs.ClusterServiceArtifactResponseInfo = {
"type" : "object",
"properties" : {
- "view_name" : {
+ "cluster_name" : {
+ "type" : "string"
+ },
+ "artifact_name" : {
+ "type" : "string"
+ },
+ "service_name" : {
"type" : "string"
}
}
};
- defs.ViewInstanceRequest = {
+ defs.ComponentDependencyResponse = {
"type" : "object",
"properties" : {
- "ViewInstanceInfo" : {
- "$ref" : "#/definitions/ViewInstanceRequestInfo"
+ "Dependencies" : {
+ "$ref" : "#/definitions/ComponentDependencyResponseInfo"
}
}
};
- defs.ViewInstanceRequestInfo = {
+ defs.ComponentDependencyResponseInfo = {
"type" : "object",
"properties" : {
- "label" : {
+ "scope" : {
"type" : "string"
},
- "description" : {
+ "component_name" : {
"type" : "string"
},
- "visible" : {
- "type" : "boolean",
- "default" : false
+ "stack_name" : {
+ "type" : "string"
},
- "icon_path" : {
+ "stack_version" : {
"type" : "string"
},
- "icon64_path" : {
+ "service_name" : {
"type" : "string"
},
- "properties" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
+ "conditions" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/DependencyConditionInfo"
}
},
- "instance_data" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
+ "dependent_component_name" : {
+ "type" : "string"
},
- "cluster_handle" : {
- "type" : "integer",
- "format" : "int32"
+ "dependent_service_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ComponentInfo = {
+ "type" : "object",
+ "properties" : {
+ "provision_action" : {
+ "type" : "string"
},
- "cluster_type" : {
- "type" : "string",
- "enum" : [ "LOCAL_AMBARI", "REMOTE_AMBARI", "NONE" ]
+ "name" : {
+ "type" : "string"
}
}
};
- defs.ViewInstanceResponse = {
+ defs.ComponentRecoveryReport = {
"type" : "object",
"properties" : {
- "ViewInstanceInfo" : {
- "$ref" : "#/definitions/ViewInstanceResponseInfo"
+ "name" : {
+ "type" : "string"
+ },
+ "numAttempts" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "limitReached" : {
+ "type" : "boolean",
+ "default" : false
}
}
};
- defs.ViewInstanceResponseInfo = {
+ defs.ConfigCondition = {
"type" : "object",
"properties" : {
- "view_name" : {
+ "configs" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "resource" : {
"type" : "string"
},
- "version" : {
+ "if" : {
"type" : "string"
},
- "instance_name" : {
+ "then" : {
+ "$ref" : "#/definitions/ConfigConditionResult"
+ },
+ "else" : {
+ "$ref" : "#/definitions/ConfigConditionResult"
+ }
+ }
+};
+ defs.ConfigConditionResult = {
+ "type" : "object",
+ "properties" : {
+ "property_value_attributes" : {
+ "$ref" : "#/definitions/ValueAttributesInfo"
+ }
+ }
+};
+ defs.ConfigPlacement = {
+ "type" : "object",
+ "properties" : {
+ "config" : {
"type" : "string"
},
- "label" : {
+ "subsection-name" : {
"type" : "string"
},
- "description" : {
+ "subsection-tab-name" : {
"type" : "string"
},
- "visible" : {
+ "property_value_attributes" : {
+ "$ref" : "#/definitions/ValueAttributesInfo"
+ },
+ "depends-on" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ConfigCondition"
+ }
+ },
+ "removed" : {
"type" : "boolean",
"default" : false
- },
- "icon_path" : {
+ }
+ }
+};
+ defs.ConfigurationRequest = {
+ "type" : "object",
+ "properties" : {
+ "clusterName" : {
"type" : "string"
},
- "icon64_path" : {
+ "type" : {
"type" : "string"
},
- "properties" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
- },
- "instance_data" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
- },
- "cluster_handle" : {
+ "version" : {
"type" : "integer",
- "format" : "int32"
- },
- "cluster_type" : {
- "type" : "string",
- "enum" : [ "LOCAL_AMBARI", "REMOTE_AMBARI", "NONE" ]
+ "format" : "int64"
},
- "context_path" : {
+ "serviceConfigVersionNote" : {
"type" : "string"
},
- "static" : {
+ "selected" : {
"type" : "boolean",
"default" : false
},
- "short_url" : {
- "type" : "string"
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
},
- "short_url_name" : {
+ "versionTag" : {
"type" : "string"
},
- "validation_result" : {
- "$ref" : "#/definitions/ValidationResult"
- },
- "property_validation_results" : {
+ "propertiesAttributes" : {
"type" : "object",
"additionalProperties" : {
- "$ref" : "#/definitions/ValidationResult"
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
}
}
}
};
- defs.ViewPermissionInfo = {
+ defs.ConfigurationResponse = {
"type" : "object",
"properties" : {
- "view_name" : {
+ "clusterName" : {
"type" : "string"
},
- "version" : {
+ "stackId" : {
+ "$ref" : "#/definitions/StackId"
+ },
+ "type" : {
"type" : "string"
},
- "permission_id" : {
+ "versionTag" : {
+ "type" : "string"
+ },
+ "version" : {
"type" : "integer",
- "format" : "int32"
+ "format" : "int64"
},
- "permission_name" : {
- "type" : "string"
+ "serviceConfigVersions" : {
+ "type" : "array",
+ "items" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
},
- "resource_name" : {
+ "configs" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "configAttributes" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ }
+ },
+ "propertiesTypes" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+};
+ defs.DependencyConditionInfo = {
+ "type" : "object"
+};
+ defs.DesiredConfig = {
+ "type" : "object",
+ "properties" : {
+ "tag" : {
+ "type" : "string"
+ },
+ "serviceName" : {
"type" : "string"
+ },
+ "version" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "hostOverrides" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/HostOverride"
+ }
}
}
};
- defs.ViewPermissionResponse = {
+ defs.Directory = {
"type" : "object",
"properties" : {
- "ViewPermissionInfo" : {
- "$ref" : "#/definitions/ViewPermissionInfo"
+ "name" : {
+ "type" : "string"
+ },
+ "type" : {
+ "type" : "string"
}
}
};
- defs.ViewPrivilegeRequest = {
+ defs.DiskInfo = {
"type" : "object",
"properties" : {
- "PrivilegeInfo/permission_name" : {
+ "available" : {
"type" : "string"
},
- "PrivilegeInfo/principal_type" : {
- "type" : "string",
- "enum" : [ "USER", "GROUP", "ROLE" ]
+ "device" : {
+ "type" : "string"
},
- "PrivilegeInfo/principal_name" : {
+ "used" : {
+ "type" : "string"
+ },
+ "percent" : {
+ "type" : "string"
+ },
+ "size" : {
+ "type" : "string"
+ },
+ "type" : {
+ "type" : "string"
+ },
+ "mountPoint" : {
"type" : "string"
}
}
};
- defs.ViewPrivilegeResponse = {
+ defs.ExistingUser = {
+ "type" : "object",
+ "properties" : {
+ "userName" : {
+ "type" : "string"
+ },
+ "userHomeDir" : {
+ "type" : "string"
+ },
+ "userStatus" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ExtensionLinkResponse = {
+ "type" : "object",
+ "properties" : {
+ "ExtensionLink" : {
+ "$ref" : "#/definitions/ExtensionLinkResponseInfo"
+ }
+ }
+};
+ defs.ExtensionLinkResponseInfo = {
+ "type" : "object",
+ "properties" : {
+ "link_id" : {
+ "type" : "string"
+ },
+ "stack_name" : {
+ "type" : "string"
+ },
+ "stack_version" : {
+ "type" : "string"
+ },
+ "extension_name" : {
+ "type" : "string"
+ },
+ "extension_version" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.GroupPrivilegeResponse = {
"type" : "object",
+ "required" : [ "PrivilegeInfo/group_name" ],
"properties" : {
"PrivilegeInfo/permission_label" : {
"type" : "string"
@@ -1254,6 +1567,13 @@ margin-bottom: 20px;
"PrivilegeInfo/principal_name" : {
"type" : "string"
},
+ "PrivilegeInfo/type" : {
+ "type" : "string",
+ "enum" : [ "AMBARI", "CLUSTER", "VIEW" ]
+ },
+ "PrivilegeInfo/cluster_name" : {
+ "type" : "string"
+ },
"PrivilegeInfo/view_name" : {
"type" : "string"
},
@@ -1262,379 +1582,37835 @@ margin-bottom: 20px;
},
"PrivilegeInfo/instance_name" : {
"type" : "string"
+ },
+ "PrivilegeInfo/group_name" : {
+ "type" : "string"
}
}
};
- defs.ViewResponse = {
+ defs.GroupRequest = {
"type" : "object",
+ "required" : [ "Groups/group_name" ],
"properties" : {
- "ViewInfo" : {
- "$ref" : "#/definitions/ViewInfo"
+ "Groups/group_name" : {
+ "type" : "string"
}
}
};
- defs.ViewVersionInfo = {
+ defs.GroupResponse = {
"type" : "object",
"properties" : {
- "archive" : {
- "type" : "string"
- },
- "build_number" : {
+ "Groups/group_name" : {
"type" : "string"
},
- "cluster_configurable" : {
+ "Groups/ldap_group" : {
"type" : "boolean",
"default" : false
},
- "description" : {
- "type" : "string"
- },
- "label" : {
- "type" : "string"
- },
- "masker_class" : {
- "type" : "string"
- },
- "max_ambari_version" : {
- "type" : "string"
+ "Groups/group_type" : {
+ "type" : "string",
+ "enum" : [ "LOCAL", "LDAP", "JWT", "PAM" ]
+ }
+ }
+};
+ defs.HostConfig = {
+ "type" : "object",
+ "properties" : {
+ "configGroupOverrides" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
},
- "min_ambari_version" : {
+ "defaultVersionTag" : {
"type" : "string"
+ }
+ }
+};
+ defs.HostGroupInfo = {
+ "type" : "object",
+ "properties" : {
+ "components" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ComponentInfo"
+ }
},
- "parameters" : {
+ "configurations" : {
"type" : "array",
"items" : {
- "$ref" : "#/definitions/ParameterConfig"
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
}
},
- "status" : {
- "type" : "string",
- "enum" : [ "PENDING", "DEPLOYING", "DEPLOYED", "ERROR" ]
+ "cardinality" : {
+ "type" : "integer",
+ "format" : "int32"
},
- "status_detail" : {
+ "name" : {
"type" : "string"
+ }
+ }
+};
+ defs.HostHealth = {
+ "type" : "object",
+ "properties" : {
+ "activeJavaProcs" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/JavaProc"
+ }
},
- "system" : {
- "type" : "boolean",
- "default" : false
+ "agentTimeStampAtReporting" : {
+ "type" : "integer",
+ "format" : "int64"
},
- "version" : {
- "type" : "string"
+ "serverTimeStampAtReporting" : {
+ "type" : "integer",
+ "format" : "int64"
},
- "view_name" : {
- "type" : "string"
+ "liveServices" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/LiveService"
+ }
}
}
};
- defs.ViewVersionResponse = {
+ defs.HostOverride = {
"type" : "object",
"properties" : {
- "ViewVersionInfo" : {
- "$ref" : "#/definitions/ViewVersionInfo"
+ "name" : {
+ "type" : "string"
+ },
+ "versionTag" : {
+ "type" : "string"
}
}
};
- defs.WidgetLayoutIdWrapper = {
+ defs.HostRequest = {
"type" : "object",
"properties" : {
- "id" : {
- "type" : "integer",
- "format" : "int64"
+ "host_name" : {
+ "type" : "string"
+ },
+ "rack_info" : {
+ "type" : "string"
+ },
+ "desired_configs" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ConfigurationRequest"
+ }
+ },
+ "maintenance_state" : {
+ "type" : "string"
+ },
+ "public_host_name" : {
+ "type" : "string"
+ },
+ "blueprint" : {
+ "type" : "string"
+ },
+ "host_group" : {
+ "type" : "string"
}
}
};
- defs.WidgetResponse = {
+ defs.HostResponse = {
"type" : "object",
"properties" : {
- "id" : {
+ "host_name" : {
+ "type" : "string"
+ },
+ "cluster_name" : {
+ "type" : "string"
+ },
+ "ip" : {
+ "type" : "string"
+ },
+ "cpu_count" : {
"type" : "integer",
"format" : "int64"
},
- "widgetName" : {
+ "ph_cpu_count" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "os_arch" : {
"type" : "string"
},
- "widgetType" : {
+ "os_family" : {
"type" : "string"
},
- "metrics" : {
+ "os_type" : {
"type" : "string"
},
- "timeCreated" : {
+ "total_mem" : {
"type" : "integer",
"format" : "int64"
},
- "author" : {
- "type" : "string"
+ "disk_info" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/DiskInfo"
+ }
},
- "description" : {
- "type" : "string"
+ "last_heartbeat_time" : {
+ "type" : "integer",
+ "format" : "int64"
},
- "displayName" : {
+ "last_agent_env" : {
+ "$ref" : "#/definitions/AgentEnv"
+ },
+ "last_registration_time" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "rack_info" : {
"type" : "string"
},
- "scope" : {
+ "recovery_report" : {
+ "$ref" : "#/definitions/RecoveryReport"
+ },
+ "recovery_summary" : {
"type" : "string"
},
- "widgetValues" : {
+ "host_state" : {
+ "type" : "string",
+ "enum" : [ "INIT", "WAITING_FOR_HOST_STATUS_UPDATES", "HEALTHY", "HEARTBEAT_LOST", "UNHEALTHY" ]
+ },
+ "desired_configs" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/HostConfig"
+ }
+ },
+ "host_status" : {
"type" : "string"
},
- "properties" : {
+ "maintenance_state" : {
+ "type" : "string",
+ "enum" : [ "OFF", "ON", "IMPLIED_FROM_SERVICE", "IMPLIED_FROM_HOST", "IMPLIED_FROM_SERVICE_AND_HOST" ]
+ },
+ "host_health_report" : {
"type" : "string"
},
- "clusterName" : {
+ "public_host_name" : {
"type" : "string"
}
}
};
- </script>
-
- <div class="container-fluid">
- <div class="row-fluid">
- <div id="sidenav" class="span2">
- <nav id="scrollingNav">
- <ul class="sidenav nav nav-list">
- <!-- Logo Area -->
- <!--<div style="width: 80%; background-color: #4c8eca; color: white; padding: 20px; text-align: center; margin-bottom: 20px; ">
+ defs.JavaProc = {
+ "type" : "object",
+ "properties" : {
+ "user" : {
+ "type" : "string"
+ },
+ "pid" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "command" : {
+ "type" : "string"
+ },
+ "hadoop" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.Layout = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "tabs" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Tab"
+ }
+ }
+ }
+};
+ defs.Link = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "label" : {
+ "type" : "string"
+ },
+ "componentName" : {
+ "type" : "string"
+ },
+ "requiresUserName" : {
+ "type" : "string"
+ },
+ "url" : {
+ "type" : "string"
+ },
+ "port" : {
+ "$ref" : "#/definitions/Port"
+ },
+ "protocol" : {
+ "$ref" : "#/definitions/Protocol"
+ },
+ "attributes" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "visible" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "removed" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.LiveService = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string"
+ },
+ "desc" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.MemberRequest = {
+ "type" : "object",
+ "required" : [ "MemberInfo/group_name", "MemberInfo/user_name" ],
+ "properties" : {
+ "MemberInfo/group_name" : {
+ "type" : "string"
+ },
+ "MemberInfo/user_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.MemberResponse = {
+ "type" : "object",
+ "properties" : {
+ "MemberInfo/group_name" : {
+ "type" : "string"
+ },
+ "MemberInfo/user_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.OperatingSystemEntity = {
+ "type" : "object",
+ "properties" : {
+ "osType" : {
+ "type" : "string"
+ },
+ "repositories" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/RepositoryEntity"
+ }
+ },
+ "ambariManagedRepos" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.OperationLevel = {
+ "type" : "object",
+ "properties" : {
+ "level" : {
+ "type" : "string"
+ },
+ "cluster_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.Os = {
+ "type" : "object",
+ "properties" : {
+ "family" : {
+ "type" : "string",
+ "xml" : {
+ "attribute" : true
+ }
+ },
+ "packageVersion" : {
+ "type" : "string",
+ "xml" : {
+ "name" : "package-version"
+ }
+ },
+ "repos" : {
+ "type" : "array",
+ "xml" : {
+ "name" : "repo"
+ },
+ "items" : {
+ "$ref" : "#/definitions/Repo"
+ }
+ }
+ }
+};
+ defs.PackageDetail = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ },
+ "repoName" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ParameterConfig = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "label" : {
+ "type" : "string"
+ },
+ "placeholder" : {
+ "type" : "string"
+ },
+ "defaultValue" : {
+ "type" : "string",
+ "xml" : {
+ "name" : "default-value"
+ }
+ },
+ "clusterConfig" : {
+ "type" : "string",
+ "xml" : {
+ "name" : "cluster-config"
+ }
+ },
+ "required" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "masked" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.Placement = {
+ "type" : "object",
+ "properties" : {
+ "configs" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ConfigPlacement"
+ }
+ },
+ "configurationLayout" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.Port = {
+ "type" : "object",
+ "properties" : {
+ "httpProperty" : {
+ "type" : "string"
+ },
+ "httpDefaultPort" : {
+ "type" : "string"
+ },
+ "httpsProperty" : {
+ "type" : "string"
+ },
+ "httpsDefaultPort" : {
+ "type" : "string"
+ },
+ "regex" : {
+ "type" : "string"
+ },
+ "site" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.PrivilegeResponse = {
+ "type" : "object",
+ "properties" : {
+ "PrivilegeInfo/permission_label" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/privilege_id" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "PrivilegeInfo/permission_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/principal_type" : {
+ "type" : "string",
+ "enum" : [ "USER", "GROUP", "ROLE" ]
+ },
+ "PrivilegeInfo/principal_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/type" : {
+ "type" : "string",
+ "enum" : [ "AMBARI", "CLUSTER", "VIEW" ]
+ },
+ "PrivilegeInfo/cluster_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/view_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/version" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/instance_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.PropertyDependencyInfo = {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "type" : "string"
+ },
+ "name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.Protocol = {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "type" : "string"
+ },
+ "checks" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Check"
+ }
+ }
+ }
+};
+ defs.QuickLinksConfiguration = {
+ "type" : "object",
+ "properties" : {
+ "protocol" : {
+ "$ref" : "#/definitions/Protocol"
+ },
+ "links" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Link"
+ }
+ }
+ }
+};
+ defs.QuickLinksResponse = {
+ "type" : "object",
+ "properties" : {
+ "QuickLinkInfo" : {
+ "$ref" : "#/definitions/QuickLinksResponseInfo"
+ }
+ }
+};
+ defs.QuickLinksResponseInfo = {
+ "type" : "object",
+ "properties" : {
+ "file_name" : {
+ "type" : "string"
+ },
+ "default" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "stack_name" : {
+ "type" : "string"
+ },
+ "stack_version" : {
+ "type" : "string"
+ },
+ "quicklink_data" : {
+ "$ref" : "#/definitions/QuickLinksConfiguration"
+ },
+ "service_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.RecoveryReport = {
+ "type" : "object",
+ "properties" : {
+ "summary" : {
+ "type" : "string"
+ },
+ "componentReports" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ComponentRecoveryReport"
+ }
+ }
+ }
+};
+ defs.Release = {
+ "type" : "object",
+ "properties" : {
+ "repositoryType" : {
+ "type" : "string",
+ "xml" : {
+ "name" : "type"
+ },
+ "enum" : [ "STANDARD", "PATCH", "SERVICE" ]
+ },
+ "stackId" : {
+ "type" : "string",
+ "xml" : {
+ "name" : "stack-id"
+ }
+ },
+ "version" : {
+ "type" : "string"
+ },
+ "build" : {
+ "type" : "string"
+ },
+ "compatibleWith" : {
+ "type" : "string",
+ "xml" : {
+ "name" : "compatible-with"
+ }
+ },
+ "releaseNotes" : {
+ "type" : "string",
+ "xml" : {
+ "name" : "release-notes"
+ }
+ },
+ "display" : {
+ "type" : "string"
+ },
+ "fullVersion" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.Repo = {
+ "type" : "object",
+ "properties" : {
+ "unique" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "baseUrl" : {
+ "type" : "string"
+ },
+ "mirrorsList" : {
+ "type" : "string"
+ },
+ "repoId" : {
+ "type" : "string"
+ },
+ "latestUri" : {
+ "type" : "string"
+ },
+ "repoName" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.RepositoryEntity = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "baseUrl" : {
+ "type" : "string"
+ },
+ "repositoryId" : {
+ "type" : "string"
+ },
+ "mirrorsList" : {
+ "type" : "string"
+ },
+ "unique" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.RepositoryInfo = {
+ "type" : "object",
+ "properties" : {
+ "baseUrl" : {
+ "type" : "string"
+ },
+ "osType" : {
+ "type" : "string"
+ },
+ "repoId" : {
+ "type" : "string"
+ },
+ "repoName" : {
+ "type" : "string"
+ },
+ "mirrorsList" : {
+ "type" : "string"
+ },
+ "defaultBaseUrl" : {
+ "type" : "string"
+ },
+ "latestBaseUrl" : {
+ "type" : "string"
+ },
+ "repoSaved" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "unique" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "ambariManagedRepositories" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.RepositoryVersionEntity = {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "stack" : {
+ "$ref" : "#/definitions/StackEntity"
+ },
+ "version" : {
+ "type" : "string"
+ },
+ "displayName" : {
+ "type" : "string"
+ },
+ "operatingSystems" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/OperatingSystemEntity"
+ }
+ },
+ "type" : {
+ "type" : "string",
+ "enum" : [ "STANDARD", "PATCH", "SERVICE" ]
+ },
+ "versionXml" : {
+ "type" : "string"
+ },
+ "versionUrl" : {
+ "type" : "string"
+ },
+ "versionXsd" : {
+ "type" : "string"
+ },
+ "children" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/RepositoryVersionEntity"
+ }
+ },
+ "stackId" : {
+ "$ref" : "#/definitions/StackId"
+ },
+ "stackName" : {
+ "type" : "string"
+ },
+ "stackVersion" : {
+ "type" : "string"
+ },
+ "operatingSystemsJson" : {
+ "type" : "string"
+ },
+ "repositoryXml" : {
+ "$ref" : "#/definitions/VersionDefinitionXml"
+ },
+ "parentId" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
+ }
+};
+ defs.RepositoryXml = {
+ "type" : "object",
+ "properties" : {
+ "oses" : {
+ "type" : "array",
+ "xml" : {
+ "name" : "os"
+ },
+ "items" : {
+ "$ref" : "#/definitions/Os"
+ }
+ },
+ "valid" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "repositories" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/RepositoryInfo"
+ }
+ },
+ "errors" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "latestURI" : {
+ "type" : "string"
+ }
+ },
+ "xml" : {
+ "name" : "reposinfo"
+ }
+};
+ defs.Request = {
+ "type" : "object",
+ "properties" : {
+ "exclusive" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "resource_filters" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/RequestResourceFilter"
+ }
+ },
+ "cluster_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.RequestInfo = {
+ "type" : "object",
+ "properties" : {
+ "parameters" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ },
+ "command" : {
+ "type" : "string"
+ },
+ "operation_level" : {
+ "$ref" : "#/definitions/OperationLevel"
+ },
+ "action" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.RequestPostRequest = {
+ "type" : "object",
+ "properties" : {
+ "Body" : {
+ "$ref" : "#/definitions/Body"
+ },
+ "RequestInfo" : {
+ "$ref" : "#/definitions/RequestInfo"
+ }
+ }
+};
+ defs.RequestPostResponse = {
+ "type" : "object",
+ "properties" : {
+ "Requests" : {
+ "$ref" : "#/definitions/ShortRequestInfo"
+ }
+ }
+};
+ defs.RequestPutRequest = {
+ "type" : "object",
+ "properties" : {
+ "Requests" : {
+ "$ref" : "#/definitions/RequestRequest"
+ }
+ }
+};
+ defs.RequestRequest = {
+ "type" : "object",
+ "properties" : {
+ "cluster_name" : {
+ "type" : "string"
+ },
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "request_status" : {
+ "type" : "string",
+ "enum" : [ "PENDING", "QUEUED", "IN_PROGRESS", "HOLDING", "COMPLETED", "FAILED", "HOLDING_FAILED", "TIMEDOUT", "HOLDING_TIMEDOUT", "ABORTED", "SKIPPED_FAILED" ]
+ },
+ "abort_reason" : {
+ "type" : "string"
+ },
+ "removePendingHostRequests" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.RequestResourceFilter = {
+ "type" : "object",
+ "properties" : {
+ "component_name" : {
+ "type" : "string"
+ },
+ "hosts_predicate" : {
+ "type" : "string"
+ },
+ "hosts" : {
+ "type" : "string"
+ },
+ "service_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.RequestResponse = {
+ "type" : "object",
+ "properties" : {
+ "Requests" : {
+ "$ref" : "#/definitions/RequestStatusInfo"
+ }
+ }
+};
+ defs.RequestStatusInfo = {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "type" : "string"
+ },
+ "start_time" : {
+ "type" : "string"
+ },
+ "request_status" : {
+ "type" : "string"
+ },
+ "request_context" : {
+ "type" : "string"
+ },
+ "request_schedule" : {
+ "type" : "string"
+ },
+ "create_time" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "id" : {
+ "type" : "string"
+ },
+ "aborted_task_count" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "end_time" : {
+ "type" : "string"
+ },
+ "exclusive" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "failed_task_count" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "inputs" : {
+ "type" : "string"
+ },
+ "operation_level" : {
+ "type" : "string"
+ },
+ "progress_percent" : {
+ "type" : "number",
+ "format" : "double"
+ },
+ "queued_task_count" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "request_schedule_id" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "resource_filters" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/RequestResourceFilter"
+ }
+ },
+ "cluster_name" : {
+ "type" : "string"
+ },
+ "task_count" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "completed_task_count" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.RootServiceComponentResponse = {
+ "type" : "object",
+ "properties" : {
+ "service_name" : {
+ "type" : "string"
+ },
+ "component_name" : {
+ "type" : "string"
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "component_version" : {
+ "type" : "string"
+ },
+ "server_clock" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
+ }
+};
+ defs.RootServiceComponentResponseWrapper = {
+ "type" : "object",
+ "properties" : {
+ "RootServiceComponents" : {
+ "$ref" : "#/definitions/RootServiceComponentResponse"
+ }
+ }
+};
+ defs.RootServiceComponentWithHostComponentList = {
+ "type" : "object",
+ "properties" : {
+ "hostComponents" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/RootServiceHostComponentResponseWrapper"
+ }
+ },
+ "RootServiceComponents" : {
+ "$ref" : "#/definitions/RootServiceComponentResponse"
+ }
+ }
+};
+ defs.RootServiceHostComponentResponse = {
+ "type" : "object",
+ "properties" : {
+ "service_name" : {
+ "type" : "string"
+ },
+ "host_name" : {
+ "type" : "string"
+ },
+ "component_name" : {
+ "type" : "string"
+ },
+ "component_state" : {
+ "type" : "string"
+ },
+ "component_version" : {
+ "type" : "string"
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ }
+ }
+};
+ defs.RootServiceHostComponentResponseWrapper = {
+ "type" : "object",
+ "properties" : {
+ "RootServiceHostComponents" : {
+ "$ref" : "#/definitions/RootServiceHostComponentResponse"
+ }
+ }
+};
+ defs.RootServiceResponse = {
+ "type" : "object",
+ "properties" : {
+ "service_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.RootServiceResponseWithComponentList = {
+ "type" : "object",
+ "properties" : {
+ "components" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/RootServiceComponentResponseWrapper"
+ }
+ },
+ "RootService" : {
+ "$ref" : "#/definitions/RootServiceResponse"
+ }
+ }
+};
+ defs.RootServiceResponseWrapper = {
+ "type" : "object",
+ "properties" : {
+ "RootService" : {
+ "$ref" : "#/definitions/RootServiceResponse"
+ }
+ }
+};
+ defs.Section = {
+ "type" : "object",
+ "properties" : {
+ "subsections" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Subsection"
+ }
+ },
+ "display-name" : {
+ "type" : "string"
+ },
+ "row-index" : {
+ "type" : "string"
+ },
+ "section-rows" : {
+ "type" : "string"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "column-span" : {
+ "type" : "string"
+ },
+ "section-columns" : {
+ "type" : "string"
+ },
+ "column-index" : {
+ "type" : "string"
+ },
+ "row-span" : {
+ "type" : "string"
+ },
+ "removed" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.SecurityInfo = {
+ "type" : "object",
+ "properties" : {
+ "kerberos_descriptor_reference" : {
+ "type" : "string"
+ },
+ "kerberos_descriptor" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ },
+ "security_type" : {
+ "type" : "string",
+ "enum" : [ "NONE", "KERBEROS" ]
+ }
+ }
+};
+ defs.ServiceConfigVersionRequest = {
+ "type" : "object",
+ "properties" : {
+ "clusterName" : {
+ "type" : "string"
+ },
+ "serviceName" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "createTime" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "applyTime" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "userName" : {
+ "type" : "string"
+ },
+ "note" : {
+ "type" : "string"
+ },
+ "isCurrent" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.ServiceConfigVersionResponse = {
+ "type" : "object",
+ "properties" : {
+ "clusterName" : {
+ "type" : "string"
+ },
+ "serviceName" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "createTime" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "groupId" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "groupName" : {
+ "type" : "string"
+ },
+ "userName" : {
+ "type" : "string"
+ },
+ "note" : {
+ "type" : "string"
+ },
+ "stackId" : {
+ "type" : "string"
+ },
+ "isCurrent" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "configurations" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ConfigurationResponse"
+ }
+ },
+ "hosts" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "compatibleWithCurrentStack" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.ServiceRequest = {
+ "type" : "object",
+ "properties" : {
+ "cluster_name" : {
+ "type" : "string"
+ },
+ "service_name" : {
+ "type" : "string"
+ },
+ "state" : {
+ "type" : "string"
+ },
+ "maintenance_state" : {
+ "type" : "string"
+ },
+ "credential_store_enabled" : {
+ "type" : "string"
+ },
+ "credential_store_supporteds" : {
+ "type" : "string"
+ },
+ "desiredStack" : {
+ "type" : "string"
+ },
+ "desiredRepositoryVersion" : {
+ "type" : "string"
+ },
+ "resolvedRepository" : {
+ "$ref" : "#/definitions/RepositoryVersionEntity"
+ }
+ }
+};
+ defs.ServiceRequestSwagger = {
+ "type" : "object",
+ "properties" : {
+ "ServiceInfo" : {
+ "$ref" : "#/definitions/ServiceRequest"
+ }
+ }
+};
+ defs.ServiceResponse = {
+ "type" : "object",
+ "properties" : {
+ "cluster_name" : {
+ "type" : "string"
+ },
+ "service_name" : {
+ "type" : "string"
+ },
+ "desiredRepositoryVersion" : {
+ "type" : "string"
+ },
+ "repositoryVersionState" : {
+ "type" : "string",
+ "enum" : [ "INIT", "NOT_REQUIRED", "INSTALLING", "INSTALLED", "INSTALL_FAILED", "OUT_OF_SYNC", "CURRENT" ]
+ },
+ "state" : {
+ "type" : "string"
+ },
+ "maintenance_state" : {
+ "type" : "string"
+ },
+ "credential_store_supported" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "credential_store_enabled" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.ServiceResponseSwagger = {
+ "type" : "object",
+ "properties" : {
+ "ServiceInfo" : {
+ "$ref" : "#/definitions/ServiceResponse"
+ }
+ }
+};
+ defs.SettingRequest = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "setting_type" : {
+ "type" : "string"
+ },
+ "content" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.SettingRequestSwagger = {
+ "type" : "object",
+ "properties" : {
+ "Settings" : {
+ "$ref" : "#/definitions/SettingRequest"
+ }
+ }
+};
+ defs.SettingResponse = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "setting_type" : {
+ "type" : "string"
+ },
+ "content" : {
+ "type" : "string"
+ },
+ "updated_by" : {
+ "type" : "string"
+ },
+ "update_timestamp" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
+ }
+};
+ defs.SettingResponseWrapper = {
+ "type" : "object",
+ "properties" : {
+ "Settings" : {
+ "$ref" : "#/definitions/SettingResponse"
+ }
+ }
+};
+ defs.ShortRequestInfo = {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "status" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.StackArtifactResponse = {
+ "type" : "object",
+ "properties" : {
+ "Artifacts" : {
+ "$ref" : "#/definitions/Artifacts"
+ },
+ "artifact_data" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ }
+ }
+};
+ defs.StackConfigurationDependencyResponse = {
+ "type" : "object",
+ "properties" : {
+ "stack_name" : {
+ "type" : "string"
+ },
+ "stack_version" : {
+ "type" : "string"
+ },
+ "service_name" : {
+ "type" : "string"
+ },
+ "property_name" : {
+ "type" : "string"
+ },
+ "dependency_name" : {
+ "type" : "string"
+ },
+ "dependency_type" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.StackConfigurationDependencyResponseSwagger = {
+ "type" : "object",
+ "properties" : {
+ "StackConfigurationDependency" : {
+ "$ref" : "#/definitions/StackConfigurationDependencyResponse"
+ }
+ }
+};
+ defs.StackConfigurationResponse = {
+ "type" : "object",
+ "properties" : {
+ "stack_name" : {
+ "type" : "string"
+ },
+ "stack_version" : {
+ "type" : "string"
+ },
+ "service_name" : {
+ "type" : "string"
+ },
+ "property_name" : {
+ "type" : "string"
+ },
+ "property_value" : {
+ "type" : "string"
+ },
+ "property_description" : {
+ "type" : "string"
+ },
+ "property_display_name" : {
+ "type" : "string"
+ },
+ "type" : {
+ "type" : "string"
+ },
+ "property_value_attributes" : {
+ "$ref" : "#/definitions/ValueAttributesInfo"
+ },
+ "dependencies" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "$ref" : "#/definitions/PropertyDependencyInfo"
+ }
+ },
+ "property_type" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string",
+ "enum" : [ "PASSWORD", "USER", "GROUP", "TEXT", "ADDITIONAL_USER_PROPERTY", "NOT_MANAGED_HDFS_PATH", "VALUE_FROM_PROPERTY_FILE", "KERBEROS_PRINCIPAL" ]
+ }
+ }
+ }
+};
+ defs.StackConfigurationResponseSwagger = {
+ "type" : "object",
+ "properties" : {
+ "StackConfigurations" : {
+ "$ref" : "#/definitions/StackConfigurationResponse"
+ }
+ }
+};
+ defs.StackEntity = {
+ "type" : "object",
+ "properties" : {
+ "stackId" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "stackName" : {
+ "type" : "string"
+ },
+ "stackVersion" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.StackId = {
+ "type" : "object",
+ "properties" : {
+ "stackName" : {
+ "type" : "string"
+ },
+ "stackVersion" : {
+ "type" : "string"
+ },
+ "stackId" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.StackResponse = {
+ "type" : "object",
+ "properties" : {
+ "stack_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.StackResponseSwagger = {
+ "type" : "object",
+ "properties" : {
+ "Stacks" : {
+ "$ref" : "#/definitions/StackResponse"
+ }
+ }
+};
+ defs.StackServiceArtifactResponse = {
+ "type" : "object",
+ "properties" : {
+ "Artifacts" : {
+ "$ref" : "#/definitions/Artifacts"
+ },
+ "artifact_data" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "properties" : { }
+ }
+ }
+ }
+};
+ defs.StackServiceComponentResponse = {
+ "type" : "object",
+ "properties" : {
+ "stack_name" : {
+ "type" : "string"
+ },
+ "stack_version" : {
+ "type" : "string"
+ },
+ "service_name" : {
+ "type" : "string"
+ },
+ "component_name" : {
+ "type" : "string"
+ },
+ "display_name" : {
+ "type" : "string"
+ },
+ "component_category" : {
+ "type" : "string"
+ },
+ "cardinality" : {
+ "type" : "string"
+ },
+ "advertise_version" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "custom_commands" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "recovery_enabled" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "bulkCommandsDisplayName" : {
+ "type" : "string"
+ },
+ "is_master" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "bulk_commands_master_component_namen" : {
+ "type" : "string"
+ },
+ "is_client" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "decommission_allowed" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "reassign_allowed" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.StackServiceComponentResponseSwagger = {
+ "type" : "object",
+ "properties" : {
+ "StackServiceComponents" : {
+ "$ref" : "#/definitions/StackServiceComponentResponse"
+ }
+ }
+};
+ defs.StackServiceResponse = {
+ "type" : "object",
+ "properties" : {
+ "stack_name" : {
+ "type" : "string"
+ },
+ "stack_version" : {
+ "type" : "string"
+ },
+ "service_name" : {
+ "type" : "string"
+ },
+ "service_type" : {
+ "type" : "string"
+ },
+ "display_name" : {
+ "type" : "string"
+ },
+ "user_name" : {
+ "type" : "string"
+ },
+ "comments" : {
+ "type" : "string"
+ },
+ "service_version" : {
+ "type" : "string"
+ },
+ "selection" : {
+ "type" : "string",
+ "enum" : [ "DEFAULT", "TECH_PREVIEW", "MANDATORY", "DEPRECATED" ]
+ },
+ "service_check_supported" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "custom_commands" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "config_types" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ }
+ }
+ },
+ "required_services" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "credential_store_supported" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "credential_store_enabled" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "credential_store_required" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.StackServiceResponseSwagger = {
+ "type" : "object",
+ "properties" : {
+ "StackServices" : {
+ "$ref" : "#/definitions/StackServiceResponse"
+ }
+ }
+};
+ defs.StackVersionResponse = {
+ "type" : "object",
+ "properties" : {
+ "min_jdk" : {
+ "type" : "string"
+ },
+ "max_jdk" : {
+ "type" : "string"
+ },
+ "stack_name" : {
+ "type" : "string"
+ },
+ "stack_version" : {
+ "type" : "string"
+ },
+ "min_upgrade_version" : {
+ "type" : "string"
+ },
+ "active" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "valid" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "parent_stack_version" : {
+ "type" : "string"
+ },
+ "config_types" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ }
+ }
+ },
+ "upgrade_packs" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "stack-errors" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ }
+};
+ defs.StackVersionResponseSwagger = {
+ "type" : "object",
+ "properties" : {
+ "Versions" : {
+ "$ref" : "#/definitions/StackVersionResponse"
+ }
+ }
+};
+ defs.Subsection = {
+ "type" : "object",
+ "properties" : {
+ "row-index" : {
+ "type" : "string"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "display-name" : {
+ "type" : "string"
+ },
+ "column-span" : {
+ "type" : "string"
+ },
+ "row-span" : {
+ "type" : "string"
+ },
+ "column-index" : {
+ "type" : "string"
+ },
+ "border" : {
+ "type" : "string"
+ },
+ "left-vertical-splitter" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "depends-on" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ConfigCondition"
+ }
+ },
+ "subsection-tab" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/SubsectionTab"
+ }
+ },
+ "removed" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.SubsectionTab = {
+ "type" : "object",
+ "properties" : {
+ "name" : {
+ "type" : "string"
+ },
+ "displayName" : {
+ "type" : "string"
+ },
+ "dependsOn" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ConfigCondition"
+ }
+ }
+ }
+};
+ defs.Tab = {
+ "type" : "object",
+ "properties" : {
+ "display-name" : {
+ "type" : "string"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "layout" : {
+ "$ref" : "#/definitions/TabLayout"
+ }
+ }
+};
+ defs.TabLayout = {
+ "type" : "object",
+ "properties" : {
+ "tab-rows" : {
+ "type" : "string"
+ },
+ "sections" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Section"
+ }
+ },
+ "tab-columns" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.Theme = {
+ "type" : "object",
+ "properties" : {
+ "description" : {
+ "type" : "string"
+ },
+ "name" : {
+ "type" : "string"
+ },
+ "configuration" : {
+ "$ref" : "#/definitions/ThemeConfiguration"
+ }
+ }
+};
+ defs.ThemeConfiguration = {
+ "type" : "object",
+ "properties" : {
+ "placement" : {
+ "$ref" : "#/definitions/Placement"
+ },
+ "widgets" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/WidgetEntry"
+ }
+ },
+ "layouts" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Layout"
+ }
+ }
+ }
+};
+ defs.ThemeInfoResponse = {
+ "type" : "object",
+ "properties" : {
+ "file_name" : {
+ "type" : "string"
+ },
+ "default" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "stack_name" : {
+ "type" : "string"
+ },
+ "stack_version" : {
+ "type" : "string"
+ },
+ "theme_data" : {
+ "$ref" : "#/definitions/Theme"
+ },
+ "service_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ThemeResponse = {
+ "type" : "object",
+ "properties" : {
+ "ThemeInfo" : {
+ "$ref" : "#/definitions/ThemeInfoResponse"
+ }
+ }
+};
+ defs.Unit = {
+ "type" : "object",
+ "properties" : {
+ "unit-name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.UserAuthorizationResponse = {
+ "type" : "object",
+ "required" : [ "AuthorizationInfo/user_name" ],
+ "properties" : {
+ "AuthorizationInfo/authorization_id" : {
+ "type" : "string"
+ },
+ "AuthorizationInfo/authorization_name" : {
+ "type" : "string"
+ },
+ "AuthorizationInfo/resource_type" : {
+ "type" : "string"
+ },
+ "AuthorizationInfo/user_name" : {
+ "type" : "string"
+ },
+ "AuthorizationInfo/cluster_name" : {
+ "type" : "string"
+ },
+ "AuthorizationInfo/view_name" : {
+ "type" : "string"
+ },
+ "AuthorizationInfo/view_version" : {
+ "type" : "string"
+ },
+ "AuthorizationInfo/view_instance_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.UserGroupInfo = {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "type" : "string"
+ },
+ "name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.UserPrivilegeResponse = {
+ "type" : "object",
+ "required" : [ "PrivilegeInfo/user_name" ],
+ "properties" : {
+ "PrivilegeInfo/permission_label" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/privilege_id" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "PrivilegeInfo/permission_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/principal_type" : {
+ "type" : "string",
+ "enum" : [ "USER", "GROUP", "ROLE" ]
+ },
+ "PrivilegeInfo/principal_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/type" : {
+ "type" : "string",
+ "enum" : [ "AMBARI", "CLUSTER", "VIEW" ]
+ },
+ "PrivilegeInfo/cluster_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/view_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/version" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/instance_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/user_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.UserRequest = {
+ "type" : "object",
+ "properties" : {
+ "Users/password" : {
+ "type" : "string"
+ },
+ "Users/old_password" : {
+ "type" : "string"
+ },
+ "Users/active" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "Users/admin" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.UserResponse = {
+ "type" : "object",
+ "required" : [ "Users/user_name" ],
+ "properties" : {
+ "Users/user_type" : {
+ "type" : "string",
+ "enum" : [ "LOCAL", "LDAP", "JWT", "PAM" ]
+ },
+ "Users/groups" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "Users/user_name" : {
+ "type" : "string"
+ },
+ "Users/active" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "Users/ldap_user" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "Users/admin" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.ValidationResult = {
+ "type" : "object",
+ "properties" : {
+ "detail" : {
+ "type" : "string"
+ },
+ "valid" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.ValueAttributesInfo = {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "type" : "string"
+ },
+ "maximum" : {
+ "type" : "string"
+ },
+ "minimum" : {
+ "type" : "string"
+ },
+ "unit" : {
+ "type" : "string"
+ },
+ "delete" : {
+ "type" : "string"
+ },
+ "visible" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "overridable" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "copy" : {
+ "type" : "string"
+ },
+ "empty_value_valid" : {
+ "type" : "boolean",
+ "xml" : {
+ "name" : "empty-value-valid"
+ },
+ "default" : false
+ },
+ "ui_only_property" : {
+ "type" : "boolean",
+ "xml" : {
+ "name" : "ui-only-property"
+ },
+ "default" : false
+ },
+ "read_only" : {
+ "type" : "boolean",
+ "xml" : {
+ "name" : "read-only"
+ },
+ "default" : false
+ },
+ "editable_only_at_install" : {
+ "type" : "boolean",
+ "xml" : {
+ "name" : "editable-only-at-install"
+ },
+ "default" : false
+ },
+ "show_property_name" : {
+ "type" : "boolean",
+ "xml" : {
+ "name" : "show-property-name"
+ },
+ "default" : false
+ },
+ "increment_step" : {
+ "type" : "string",
+ "xml" : {
+ "name" : "increment-step"
+ }
+ },
+ "entries" : {
+ "type" : "array",
+ "xml" : {
+ "name" : "entries",
+ "wrapped" : true
+ },
+ "items" : {
+ "$ref" : "#/definitions/ValueEntryInfo"
+ }
+ },
+ "hidden" : {
+ "type" : "string"
+ },
+ "entries_editable" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "selection_cardinality" : {
+ "type" : "string",
+ "xml" : {
+ "name" : "selection-cardinality"
+ }
+ },
+ "property-file-name" : {
+ "type" : "string"
+ },
+ "property-file-type" : {
+ "type" : "string"
+ },
+ "user-group-entries" : {
+ "type" : "array",
+ "xml" : {
+ "name" : "user-groups",
+ "wrapped" : true
+ },
+ "items" : {
+ "$ref" : "#/definitions/UserGroupInfo"
+ }
+ },
+ "keystore" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ }
+};
+ defs.ValueEntryInfo = {
+ "type" : "object",
+ "properties" : {
+ "value" : {
+ "type" : "string"
+ },
+ "label" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.VersionDefinitionXml = {
+ "type" : "object",
+ "properties" : {
+ "release" : {
+ "$ref" : "#/definitions/Release"
+ },
+ "repositoryInfo" : {
+ "xml" : {
+ "name" : "repository-info"
+ },
+ "$ref" : "#/definitions/RepositoryXml"
+ },
+ "xsdLocation" : {
+ "type" : "string"
+ },
+ "availableServiceNames" : {
+ "type" : "array",
+ "uniqueItems" : true,
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "stackDefault" : {
+ "type" : "boolean",
+ "default" : false
+ }
+ },
+ "xml" : {
+ "name" : "repository-version"
+ }
+};
+ defs.ViewInfo = {
+ "type" : "object",
+ "properties" : {
+ "view_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ViewInstanceRequest = {
+ "type" : "object",
+ "properties" : {
+ "ViewInstanceInfo" : {
+ "$ref" : "#/definitions/ViewInstanceRequestInfo"
+ }
+ }
+};
+ defs.ViewInstanceRequestInfo = {
+ "type" : "object",
+ "properties" : {
+ "label" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "visible" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "icon_path" : {
+ "type" : "string"
+ },
+ "icon64_path" : {
+ "type" : "string"
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "instance_data" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "cluster_handle" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "cluster_type" : {
+ "type" : "string",
+ "enum" : [ "LOCAL_AMBARI", "REMOTE_AMBARI", "NONE" ]
+ }
+ }
+};
+ defs.ViewInstanceResponse = {
+ "type" : "object",
+ "properties" : {
+ "ViewInstanceInfo" : {
+ "$ref" : "#/definitions/ViewInstanceResponseInfo"
+ }
+ }
+};
+ defs.ViewInstanceResponseInfo = {
+ "type" : "object",
+ "properties" : {
+ "view_name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ },
+ "instance_name" : {
+ "type" : "string"
+ },
+ "label" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "visible" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "icon_path" : {
+ "type" : "string"
+ },
+ "icon64_path" : {
+ "type" : "string"
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "instance_data" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "cluster_handle" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "cluster_type" : {
+ "type" : "string",
+ "enum" : [ "LOCAL_AMBARI", "REMOTE_AMBARI", "NONE" ]
+ },
+ "context_path" : {
+ "type" : "string"
+ },
+ "static" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "short_url" : {
+ "type" : "string"
+ },
+ "short_url_name" : {
+ "type" : "string"
+ },
+ "validation_result" : {
+ "$ref" : "#/definitions/ValidationResult"
+ },
+ "property_validation_results" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/ValidationResult"
+ }
+ }
+ }
+};
+ defs.ViewPermissionInfo = {
+ "type" : "object",
+ "properties" : {
+ "view_name" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ },
+ "permission_id" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "permission_name" : {
+ "type" : "string"
+ },
+ "resource_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ViewPermissionResponse = {
+ "type" : "object",
+ "properties" : {
+ "ViewPermissionInfo" : {
+ "$ref" : "#/definitions/ViewPermissionInfo"
+ }
+ }
+};
+ defs.ViewPrivilegeRequest = {
+ "type" : "object",
+ "properties" : {
+ "PrivilegeInfo/permission_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/principal_type" : {
+ "type" : "string",
+ "enum" : [ "USER", "GROUP", "ROLE" ]
+ },
+ "PrivilegeInfo/principal_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ViewPrivilegeResponse = {
+ "type" : "object",
+ "properties" : {
+ "PrivilegeInfo/permission_label" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/privilege_id" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "PrivilegeInfo/permission_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/principal_type" : {
+ "type" : "string",
+ "enum" : [ "USER", "GROUP", "ROLE" ]
+ },
+ "PrivilegeInfo/principal_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/view_name" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/version" : {
+ "type" : "string"
+ },
+ "PrivilegeInfo/instance_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ViewResponse = {
+ "type" : "object",
+ "properties" : {
+ "ViewInfo" : {
+ "$ref" : "#/definitions/ViewInfo"
+ }
+ }
+};
+ defs.ViewVersionInfo = {
+ "type" : "object",
+ "properties" : {
+ "archive" : {
+ "type" : "string"
+ },
+ "build_number" : {
+ "type" : "string"
+ },
+ "cluster_configurable" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "label" : {
+ "type" : "string"
+ },
+ "masker_class" : {
+ "type" : "string"
+ },
+ "max_ambari_version" : {
+ "type" : "string"
+ },
+ "min_ambari_version" : {
+ "type" : "string"
+ },
+ "parameters" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ParameterConfig"
+ }
+ },
+ "status" : {
+ "type" : "string",
+ "enum" : [ "PENDING", "DEPLOYING", "DEPLOYED", "ERROR" ]
+ },
+ "status_detail" : {
+ "type" : "string"
+ },
+ "system" : {
+ "type" : "boolean",
+ "default" : false
+ },
+ "version" : {
+ "type" : "string"
+ },
+ "view_name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.ViewVersionResponse = {
+ "type" : "object",
+ "properties" : {
+ "ViewVersionInfo" : {
+ "$ref" : "#/definitions/ViewVersionInfo"
+ }
+ }
+};
+ defs.Widget = {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "type" : "string"
+ },
+ "units" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Unit"
+ }
+ },
+ "required-properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "display-name" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.WidgetEntry = {
+ "type" : "object",
+ "properties" : {
+ "config" : {
+ "type" : "string"
+ },
+ "widget" : {
+ "$ref" : "#/definitions/Widget"
+ }
+ }
+};
+ defs.WidgetLayoutIdWrapper = {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
+ }
+ }
+};
+ defs.WidgetResponse = {
+ "type" : "object",
+ "properties" : {
+ "id" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "widgetName" : {
+ "type" : "string"
+ },
+ "widgetType" : {
+ "type" : "string"
+ },
+ "metrics" : {
+ "type" : "string"
+ },
+ "timeCreated" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "author" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "displayName" : {
+ "type" : "string"
+ },
+ "scope" : {
+ "type" : "string"
+ },
+ "widgetValues" : {
+ "type" : "string"
+ },
+ "properties" : {
+ "type" : "string"
+ },
+ "clusterName" : {
+ "type" : "string"
+ }
+ }
+};
+ defs.Wrapper = {
+ "type" : "object",
+ "properties" : {
+ "Hosts" : {
+ "$ref" : "#/definitions/HostResponse"
+ }
+ }
+};
+ </script>
+
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div id="sidenav" class="span2">
+ <nav id="scrollingNav">
+ <ul class="sidenav nav nav-list">
+ <!-- Logo Area -->
+ <!--<div style="width: 80%; background-color: #4c8eca; color: white; padding: 20px; text-align: center; margin-bottom: 20px; ">
+
+ API Docs 2
+
+ </div>
+ -->
+ <li class="nav-fixed nav-header active" data-group="_"><a href="#api-_">API Summary</a></li>
+
+ <li class="nav-header" data-group="Actions"><a href="#api-Actions">API Methods - Actions</a></li>
+ <li data-group="Actions" data-name="actionServiceCreateActionDefinition" class="">
+ <a href="#api-Actions-actionServiceCreateActionDefinition">actionServiceCreateActionDefinition</a>
+ </li>
+ <li data-group="Actions" data-name="actionServiceDeleteActionDefinition" class="">
+ <a href="#api-Actions-actionServiceDeleteActionDefinition">actionServiceDeleteActionDefinition</a>
+ </li>
+ <li data-group="Actions" data-name="actionServiceGetActionDefinition" class="">
+ <a href="#api-Actions-actionServiceGetActionDefinition">actionServiceGetActionDefinition</a>
+ </li>
+ <li data-group="Actions" data-name="actionServiceGetActionDefinitions" class="">
+ <a href="#api-Actions-actionServiceGetActionDefinitions">actionServiceGetActionDefinitions</a>
+ </li>
+ <li data-group="Actions" data-name="actionServiceUpdateActionDefinition" class="">
+ <a href="#api-Actions-actionServiceUpdateActionDefinition">actionServiceUpdateActionDefinition</a>
+ </li>
+ <li class="nav-header" data-group="Blueprints"><a href="#api-Blueprints">API Methods - Blueprints</a></li>
+ <li data-group="Blueprints" data-name="blueprintServiceCreateBlueprint" class="">
+ <a href="#api-Blueprints-blueprintServiceCreateBlueprint">blueprintServiceCreateBlueprint</a>
+ </li>
+ <li data-group="Blueprints" data-name="blueprintServiceDeleteBlueprint" class="">
+ <a href="#api-Blueprints-blueprintServiceDeleteBlueprint">blueprintServiceDeleteBlueprint</a>
+ </li>
+ <li data-group="Blueprints" data-name="blueprintServiceDeleteBlueprints" class="">
+ <a href="#api-Blueprints-blueprintServiceDeleteBlueprints">blueprintServiceDeleteBlueprints</a>
+ </li>
+ <li data-group="Blueprints" data-name="blueprintServiceGetBlueprint" class="">
+ <a href="#api-Blueprints-blueprintServiceGetBlueprint">blueprintServiceGetBlueprint</a>
+ </li>
+ <li data-group="Blueprints" data-name="blueprintServiceGetBlueprints" class="">
+ <a href="#api-Blueprints-blueprintServiceGetBlueprints">blueprintServiceGetBlueprints</a>
+ </li>
+ <li class="nav-header" data-group="Clusters"><a href="#api-Clusters">API Methods - Clusters</a></li>
+ <li data-group="Clusters" data-name="createCluster" class="">
+ <a href="#api-Clusters-createCluster">createCluster</a>
+ </li>
+ <li data-group="Clusters" data-name="createClusterArtifact" class="">
+ <a href="#api-Clusters-createClusterArtifact">createClusterArtifact</a>
+ </li>
+ <li data-group="Clusters" data-name="deleteCluster" class="">
+ <a href="#api-Clusters-deleteCluster">deleteCluster</a>
+ </li>
+ <li data-group="Clusters" data-name="deleteClusterArtifact" class="">
+ <a href="#api-Clusters-deleteClusterArtifact">deleteClusterArtifact</a>
+ </li>
+ <li data-group="Clusters" data-name="deleteClusterArtifacts" class="">
+ <a href="#api-Clusters-deleteClusterArtifacts">deleteClusterArtifacts</a>
+ </li>
+ <li data-group="Clusters" data-name="getCluster" class="">
+ <a href="#api-Clusters-getCluster">getCluster</a>
+ </li>
+ <li data-group="Clusters" data-name="getClusterArtifact" class="">
+ <a href="#api-Clusters-getClusterArtifact">getClusterArtifact</a>
+ </li>
+ <li data-group="Clusters" data-name="getClusterArtifacts" class="">
+ <a href="#api-Clusters-getClusterArtifacts">getClusterArtifacts</a>
+ </li>
+ <li data-group="Clusters" data-name="getClusters" class="">
+ <a href="#api-Clusters-getClusters">getClusters</a>
+ </li>
+ <li data-group="Clusters" data-name="updateCluster" class="">
+ <a href="#api-Clusters-updateCluster">updateCluster</a>
+ </li>
+ <li data-group="Clusters" data-name="updateClusterArtifact" class="">
+ <a href="#api-Clusters-updateClusterArtifact">updateClusterArtifact</a>
+ </li>
+ <li data-group="Clusters" data-name="updateClusterArtifacts" class="">
+ <a href="#api-Clusters-updateClusterArtifacts">updateClusterArtifacts</a>
+ </li>
+ <li class="nav-header" data-group="Groups"><a href="#api-Groups">API Methods - Groups</a></li>
+ <li data-group="Groups" data-name="groupPrivilegeServiceGetPrivilege" class="">
+ <a href="#api-Groups-groupPrivilegeServiceGetPrivilege">groupPrivilegeServiceGetPrivilege</a>
+ </li>
+ <li data-group="Groups" data-name="groupPrivilegeServiceGetPrivileges" class="">
+ <a href="#api-Groups-groupPrivilegeServiceGetPrivileges">groupPrivilegeServiceGetPrivileges</a>
+ </li>
+ <li data-group="Groups" data-name="groupServiceCreateGroup" class="">
+ <a href="#api-Groups-groupServiceCreateGroup">groupServiceCreateGroup</a>
+ </li>
+ <li data-group="Groups" data-name="groupServiceDeleteGroup" class="">
+ <a href="#api-Groups-groupServiceDeleteGroup">groupServiceDeleteGroup</a>
+ </li>
+ <li data-group="Groups" data-name="groupServiceGetGroup" class="">
+ <a href="#api-Groups-groupServiceGetGroup">groupServiceGetGroup</a>
+ </li>
+ <li data-group="Groups" data-name="groupServiceGetGroups" class="">
+ <a href="#api-Groups-groupServiceGetGroups">groupServiceGetGroups</a>
+ </li>
+ <li data-group="Groups" data-name="memberServiceDeleteMember" class="">
+ <a href="#api-Groups-memberServiceDeleteMember">memberServiceDeleteMember</a>
+ </li>
+ <li data-group="Groups" data-name="memberServiceGetMember" class="">
+ <a href="#api-Groups-memberServiceGetMember">memberServiceGetMember</a>
+ </li>
+ <li data-group="Groups" data-name="memberServiceGetMembers" class="">
+ <a href="#api-Groups-memberServiceGetMembers">memberServiceGetMembers</a>
+ </li>
+ <li data-group="Groups" data-name="memberServiceUpdateMembers" class="">
+ <a href="#api-Groups-memberServiceUpdateMembers">memberServiceUpdateMembers</a>
+ </li>
+ <li class="nav-header" data-group="Hosts"><a href="#api-Hosts">API Methods - Hosts</a></li>
+ <li data-group="Hosts" data-name="createHost" class="">
+ <a href="#api-Hosts-createHost">createHost</a>
+ </li>
+ <li data-group="Hosts" data-name="createHosts" class="">
+ <a href="#api-Hosts-createHosts">createHosts</a>
+ </li>
+ <li data-group="Hosts" data-name="deleteHost" class="">
+ <a href="#api-Hosts-deleteHost">deleteHost</a>
+ </li>
+ <li data-group="Hosts" data-name="deleteHosts" class="">
+ <a href="#api-Hosts-deleteHosts">deleteHosts</a>
+ </li>
+ <li data-group="Hosts" data-name="getHost" class="">
+ <a href="#api-Hosts-getHost">getHost</a>
+ </li>
+ <li data-group="Hosts" data-name="getHosts" class="">
+ <a href="#api-Hosts-getHosts">getHosts</a>
+ </li>
+ <li data-group="Hosts" data-name="updateHost" class="">
+ <a href="#api-Hosts-updateHost">updateHost</a>
+
<TRUNCATED>
[2/4] ambari git commit: AMBARI-21114 - Fix Unit Test Failures From
Prior Patch/Service Upgrade Commits (jonathanhurley)
Posted by jo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/770c519a/ambari-server/docs/api/generated/swagger.json
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/generated/swagger.json b/ambari-server/docs/api/generated/swagger.json
index f7dbb6b..d7d54a5 100644
--- a/ambari-server/docs/api/generated/swagger.json
+++ b/ambari-server/docs/api/generated/swagger.json
@@ -11,37 +11,65 @@
},
"basePath" : "/api/v1",
"tags" : [ {
+ "name" : "Actions",
+ "description" : "Endpoint for action definition specific operations"
+ }, {
+ "name" : "Blueprints",
+ "description" : "Endpoint for blueprint specific operations"
+ }, {
"name" : "Groups",
"description" : "Endpoint for group specific operations"
}, {
+ "name" : "Requests",
+ "description" : "Endpoint for request specific operations"
+ }, {
+ "name" : "Services",
+ "description" : "Endpoint for service specific operations"
+ }, {
+ "name" : "Stacks",
+ "description" : "Endpoint for stack specific operations"
+ }, {
"name" : "Users",
"description" : "Endpoint for user specific operations"
}, {
- "name" : "Views"
+ "name" : "Views",
+ "description" : "Endpoint for view specific operations"
+ }, {
+ "name" : "clusters",
+ "description" : "Endpoint for cluster-specific operations"
+ }, {
+ "name" : "hosts",
+ "description" : "Endpoint for host-specific operations"
+ }, {
+ "name" : "services",
+ "description" : "Endpoint for querying root-level services, ie. Ambari Server and Ambari Agents"
+ }, {
+ "name" : "settings",
+ "description" : "Endpoint for settings-specific operations"
} ],
"schemes" : [ "http", "https" ],
"paths" : {
- "/groups" : {
+ "/actions" : {
"get" : {
- "tags" : [ "Groups" ],
- "summary" : "Get all groups",
- "description" : "Returns details of all groups.",
- "operationId" : "GroupService#getGroups",
+ "tags" : [ "Actions" ],
+ "summary" : "Get all action definitions",
+ "description" : "",
+ "operationId" : "ActionService#getActionDefinitions",
"produces" : [ "text/plain" ],
"parameters" : [ {
"name" : "fields",
"in" : "query",
- "description" : "Filter group details",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
"type" : "string",
- "default" : "Groups/*"
+ "default" : "Actions/action_name"
}, {
"name" : "sortBy",
"in" : "query",
- "description" : "Sort groups (asc | desc)",
+ "description" : "Sort resources in result by (asc | desc)",
"required" : false,
"type" : "string",
- "default" : "Groups/group_name.asc"
+ "default" : "Actions/action_name.asc"
}, {
"name" : "page_size",
"in" : "query",
@@ -52,134 +80,191 @@
}, {
"name" : "from",
"in" : "query",
- "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+ "description" : "The starting page resource (inclusive). \"start\" is also accepted.",
"required" : false,
"type" : "string",
"default" : "0"
}, {
"name" : "to",
"in" : "query",
- "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+ "description" : "The ending page resource (inclusive). \"end\" is also accepted.",
"required" : false,
"type" : "string"
} ],
"responses" : {
"200" : {
- "description" : "Successful retrieval of all group entries",
+ "description" : "Successful operation",
"schema" : {
"type" : "array",
"items" : {
- "$ref" : "#/definitions/GroupResponse"
+ "$ref" : "#/definitions/ActionResponseSwagger"
}
}
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "500" : {
+ "description" : "Internal server error"
+ }
+ }
+ }
+ },
+ "/actions/{actionName}" : {
+ "get" : {
+ "tags" : [ "Actions" ],
+ "summary" : "Get the details of an action definition",
+ "description" : "",
+ "operationId" : "ActionService#getActionDefinition",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "actionName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "fields",
+ "in" : "query",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
+ "required" : false,
+ "type" : "string",
+ "default" : "Actions/*"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ActionResponseSwagger"
+ }
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
},
"post" : {
- "tags" : [ "Groups" ],
- "summary" : "Create new group",
- "description" : "Creates group resource.",
- "operationId" : "GroupService#createGroup",
+ "tags" : [ "Actions" ],
+ "summary" : "Creates an action definition - Currently Not Supported",
+ "description" : "",
+ "operationId" : "ActionService#createActionDefinition",
"produces" : [ "text/plain" ],
"parameters" : [ {
+ "name" : "actionName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
"in" : "body",
"name" : "body",
- "description" : "input parameters in json form",
- "required" : true,
+ "required" : false,
"schema" : {
- "$ref" : "#/definitions/GroupRequest"
+ "$ref" : "#/definitions/ActionRequestSwagger"
}
} ],
"responses" : {
- "200" : {
- "description" : "successful operation"
+ "400" : {
+ "description" : "Invalid request"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
},
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
- }
- },
- "/groups/{groupName}" : {
- "get" : {
- "tags" : [ "Groups" ],
- "summary" : "Get group",
- "description" : "Returns group details.",
- "operationId" : "GroupService#getGroup",
+ },
+ "put" : {
+ "tags" : [ "Actions" ],
+ "summary" : "Updates an action definition - Currently Not Supported",
+ "description" : "",
+ "operationId" : "ActionService#updateActionDefinition",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "groupName",
+ "name" : "actionName",
"in" : "path",
- "description" : "group name",
"required" : true,
"type" : "string"
}, {
- "name" : "fields",
- "in" : "query",
- "description" : "Filter group details",
+ "in" : "body",
+ "name" : "body",
"required" : false,
- "type" : "string",
- "default" : "Groups"
+ "schema" : {
+ "$ref" : "#/definitions/ActionRequestSwagger"
+ }
} ],
"responses" : {
- "200" : {
- "description" : "Successful retrieval of group resource",
- "schema" : {
- "$ref" : "#/definitions/GroupResponse"
- }
+ "400" : {
+ "description" : "Invalid request"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
},
"delete" : {
- "tags" : [ "Groups" ],
- "summary" : "Delete group",
- "description" : "Delete group resource.",
- "operationId" : "GroupService#deleteGroup",
+ "tags" : [ "Actions" ],
+ "summary" : "Deletes an action definition - Currently Not Supported",
+ "description" : "",
+ "operationId" : "ActionService#deleteActionDefinition",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "groupName",
+ "name" : "actionName",
"in" : "path",
- "description" : "group name",
"required" : true,
"type" : "string"
} ],
"responses" : {
- "200" : {
- "description" : "Successful operation"
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
},
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
}
},
- "/groups/{groupName}/members" : {
+ "/blueprints" : {
"get" : {
- "tags" : [ "Groups" ],
- "summary" : "Get all group members",
- "description" : "Returns details of all members.",
- "operationId" : "MemberService#getMembers",
+ "tags" : [ "Blueprints" ],
+ "summary" : "Get all blueprints",
+ "description" : "",
+ "operationId" : "BlueprintService#getBlueprints",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "groupName",
- "in" : "path",
- "description" : "group name",
- "required" : true,
- "type" : "string"
- }, {
"name" : "fields",
"in" : "query",
- "description" : "Filter member details",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
"type" : "string",
- "default" : "MemberInfo/*"
+ "default" : "Blueprints/blueprint_name"
}, {
"name" : "sortBy",
"in" : "query",
- "description" : "Sort members (asc | desc)",
+ "description" : "Sort resources in result by (asc | desc)",
"required" : false,
"type" : "string",
- "default" : "MemberInfo/user_name.asc"
+ "default" : "Blueprints/blueprint_name.asc"
}, {
"name" : "page_size",
"in" : "query",
@@ -190,14 +275,14 @@
}, {
"name" : "from",
"in" : "query",
- "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+ "description" : "The starting page resource (inclusive). \"start\" is also accepted.",
"required" : false,
"type" : "string",
"default" : "0"
}, {
"name" : "to",
"in" : "query",
- "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+ "description" : "The ending page resource (inclusive). \"end\" is also accepted.",
"required" : false,
"type" : "string"
} ],
@@ -207,95 +292,139 @@
"schema" : {
"type" : "array",
"items" : {
- "$ref" : "#/definitions/MemberResponse"
+ "$ref" : "#/definitions/BlueprintSwagger"
}
}
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
},
- "put" : {
- "tags" : [ "Groups" ],
- "summary" : "Update group members",
- "description" : "Updates group member resources.",
- "operationId" : "MemberService#updateMembers",
+ "delete" : {
+ "tags" : [ "Blueprints" ],
+ "summary" : "Deletes multiple blueprints that match the predicate. Omitting the predicate will delete all blueprints.",
+ "description" : "",
+ "operationId" : "BlueprintService#deleteBlueprints",
"produces" : [ "text/plain" ],
- "parameters" : [ {
- "name" : "groupName",
- "in" : "path",
- "description" : "group name",
- "required" : true,
- "type" : "string"
- }, {
- "in" : "body",
- "name" : "body",
- "description" : "input parameters in json form",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/MemberRequest"
- }
- } ],
"responses" : {
"200" : {
"description" : "Successful operation"
},
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
}
},
- "/groups/{groupName}/members/{userName}" : {
+ "/blueprints/{blueprintName}" : {
"get" : {
- "tags" : [ "Groups" ],
- "summary" : "Get group member",
- "description" : "Returns member details.",
- "operationId" : "MemberService#getMember",
+ "tags" : [ "Blueprints" ],
+ "summary" : "Get the details of a blueprint",
+ "description" : "",
+ "operationId" : "BlueprintService#getBlueprint",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "groupName",
- "in" : "path",
- "description" : "group name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "userName",
+ "name" : "blueprintName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
}, {
"name" : "fields",
"in" : "query",
- "description" : "Filter member details",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
"type" : "string",
- "default" : "MemberInfo"
+ "default" : "Blueprints/*"
} ],
"responses" : {
"200" : {
"description" : "Successful operation",
"schema" : {
- "$ref" : "#/definitions/MemberResponse"
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/BlueprintSwagger"
+ }
}
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
},
- "delete" : {
- "tags" : [ "Groups" ],
- "summary" : "Delete group member",
- "description" : "Delete member resource.",
- "operationId" : "MemberService#deleteMember",
+ "post" : {
+ "tags" : [ "Blueprints" ],
+ "summary" : "Creates a blueprint",
+ "description" : "",
+ "operationId" : "BlueprintService#createBlueprint",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "groupName",
+ "name" : "blueprintName",
"in" : "path",
- "description" : "group name",
"required" : true,
"type" : "string"
}, {
- "name" : "userName",
+ "in" : "body",
+ "name" : "body",
+ "required" : false,
+ "schema" : {
+ "$ref" : "#/definitions/BlueprintSwagger"
+ }
+ } ],
+ "responses" : {
+ "201" : {
+ "description" : "Successful operation"
+ },
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "409" : {
+ "description" : "The requested resource already exists."
+ },
+ "500" : {
+ "description" : "Internal server error"
+ }
+ }
+ },
+ "delete" : {
+ "tags" : [ "Blueprints" ],
+ "summary" : "Deletes a blueprint",
+ "description" : "",
+ "operationId" : "BlueprintService#deleteBlueprint",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "blueprintName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
} ],
@@ -303,39 +432,41 @@
"200" : {
"description" : "Successful operation"
},
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
}
},
- "/groups/{groupName}/privileges" : {
+ "/clusters" : {
"get" : {
- "tags" : [ "Groups" ],
- "summary" : "Get all privileges",
- "description" : "Returns all privileges for group.",
- "operationId" : "GroupPrivilegeService#getPrivileges",
+ "tags" : [ "clusters" ],
+ "summary" : "Returns all clusters",
+ "description" : "",
+ "operationId" : "getClusters",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "groupName",
- "in" : "path",
- "description" : "group name",
- "required" : true,
- "type" : "string"
- }, {
"name" : "fields",
"in" : "query",
- "description" : "Filter user privileges",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
"type" : "string",
- "default" : "PrivilegeInfo/*"
+ "default" : "cluster_name"
}, {
"name" : "sortBy",
"in" : "query",
- "description" : "Sort user privileges (asc | desc)",
+ "description" : "Sort resources in result by (asc | desc)",
"required" : false,
- "type" : "string",
- "default" : "PrivilegeInfo/user_name.asc"
+ "type" : "string"
}, {
"name" : "page_size",
"in" : "query",
@@ -346,223 +477,180 @@
}, {
"name" : "from",
"in" : "query",
- "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+ "description" : "The starting page resource (inclusive). \"start\" is also accepted.",
"required" : false,
- "type" : "string",
- "default" : "0"
+ "type" : "integer",
+ "default" : 0,
+ "minimum" : 0.0
}, {
"name" : "to",
"in" : "query",
- "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+ "description" : "The ending page resource (inclusive). \"end\" is also accepted.",
"required" : false,
- "type" : "string"
+ "type" : "integer",
+ "minimum" : 1.0
} ],
"responses" : {
"200" : {
- "description" : "successful operation",
+ "description" : "Successful operation",
"schema" : {
"type" : "array",
"items" : {
- "$ref" : "#/definitions/GroupPrivilegeResponse"
+ "$ref" : "#/definitions/ClusterResponseWrapper"
}
}
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
}
},
- "/groups/{groupName}/privileges/{privilegeId}" : {
+ "/clusters/{clusterName}" : {
"get" : {
- "tags" : [ "Groups" ],
- "summary" : "Get group privilege",
- "description" : "Returns group privilege details.",
- "operationId" : "GroupPrivilegeService#getPrivilege",
+ "tags" : [ "clusters" ],
+ "summary" : "Returns information about a specific cluster",
+ "description" : "",
+ "operationId" : "getCluster",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "groupName",
+ "name" : "clusterName",
"in" : "path",
- "description" : "group name",
"required" : true,
"type" : "string"
}, {
- "name" : "privilegeId",
- "in" : "path",
- "description" : "privilege id",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "fields",
- "in" : "query",
- "description" : "Filter group privilege details",
- "required" : false,
- "type" : "string",
- "default" : "PrivilegeInfo/*"
- } ],
- "responses" : {
- "200" : {
- "description" : "Successful operation",
- "schema" : {
- "$ref" : "#/definitions/PrivilegeResponse"
- }
- }
- }
- }
- },
- "/users" : {
- "get" : {
- "tags" : [ "Users" ],
- "summary" : "Get all users",
- "description" : "Returns details of all users.",
- "operationId" : "UserService#getUsers",
- "produces" : [ "text/plain" ],
- "parameters" : [ {
- "name" : "fields",
- "in" : "query",
- "description" : "Filter user details",
- "required" : false,
- "type" : "string",
- "default" : "Users/*"
- }, {
- "name" : "sortBy",
- "in" : "query",
- "description" : "Sort users (asc | desc)",
- "required" : false,
- "type" : "string",
- "default" : "Users/user_name.desc"
- }, {
- "name" : "page_size",
- "in" : "query",
- "description" : "The number of resources to be returned for the paged response.",
- "required" : false,
- "type" : "integer",
- "default" : 10
- }, {
- "name" : "from",
- "in" : "query",
- "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
- "required" : false,
- "type" : "string",
- "default" : "0"
- }, {
- "name" : "to",
- "in" : "query",
- "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
- "required" : false,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "Successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/UserResponse"
- }
- }
- }
- }
- }
- },
- "/users/{userName}" : {
- "get" : {
- "tags" : [ "Users" ],
- "summary" : "Get single user",
- "description" : "Returns user details.",
- "operationId" : "UserService#getUser",
- "produces" : [ "text/plain" ],
- "parameters" : [ {
- "name" : "userName",
- "in" : "path",
- "description" : "user name",
- "required" : true,
- "type" : "string",
- "default" : "admin"
- }, {
"name" : "fields",
"in" : "query",
- "description" : "Filter user details",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
"type" : "string",
- "default" : "Users"
+ "default" : "Clusters/*"
} ],
"responses" : {
"200" : {
"description" : "Successful operation",
"schema" : {
- "$ref" : "#/definitions/UserResponse"
+ "$ref" : "#/definitions/ClusterResponseWrapper"
}
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
},
"post" : {
- "tags" : [ "Users" ],
- "summary" : "Create new user",
- "description" : "Creates user resource.",
- "operationId" : "UserService#createUser",
+ "tags" : [ "clusters" ],
+ "summary" : "Creates a cluster",
+ "description" : "",
+ "operationId" : "createCluster",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "userName",
+ "name" : "clusterName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
- "description" : "input parameters in json form",
- "required" : true,
+ "required" : false,
"schema" : {
- "$ref" : "#/definitions/UserRequest"
+ "$ref" : "#/definitions/ClusterRequestSwagger"
}
} ],
"responses" : {
- "200" : {
+ "201" : {
"description" : "Successful operation"
},
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "409" : {
+ "description" : "The requested resource already exists."
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
},
"put" : {
- "tags" : [ "Users" ],
- "summary" : "Update user detail",
- "description" : "Updates user resource.",
- "operationId" : "UserService#updateUser",
+ "tags" : [ "clusters" ],
+ "summary" : "Updates a cluster",
+ "description" : "",
+ "operationId" : "updateCluster",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "userName",
+ "name" : "clusterName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
- "description" : "input parameters in json form",
- "required" : true,
+ "required" : false,
"schema" : {
- "$ref" : "#/definitions/UserRequest"
+ "$ref" : "#/definitions/ClusterRequestSwagger"
}
} ],
"responses" : {
"200" : {
"description" : "Successful operation"
},
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
},
"delete" : {
- "tags" : [ "Users" ],
- "summary" : "Delete single user",
- "description" : "Delete user resource.",
- "operationId" : "UserService#deleteUser",
+ "tags" : [ "clusters" ],
+ "summary" : "Deletes a cluster",
+ "description" : "",
+ "operationId" : "deleteCluster",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "userName",
+ "name" : "clusterName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
} ],
@@ -570,39 +658,45 @@
"200" : {
"description" : "Successful operation"
},
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
}
},
- "/users/{userName}/activeWidgetLayouts" : {
+ "/clusters/{clusterName}/artifacts" : {
"get" : {
- "tags" : [ "Users" ],
- "summary" : "Get user widget layouts",
- "description" : "Returns all active widget layouts for user.",
- "operationId" : "ActiveWidgetLayoutService#getServices",
+ "tags" : [ "clusters" ],
+ "summary" : "Returns all artifacts associated with the cluster",
+ "description" : "",
+ "operationId" : "getClusterArtifacts",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "userName",
+ "name" : "clusterName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
}, {
"name" : "fields",
"in" : "query",
- "description" : "Filter user layout details",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
- "type" : "string",
- "default" : "WidgetLayoutInfo/*"
+ "type" : "string"
}, {
"name" : "sortBy",
"in" : "query",
- "description" : "Sort layouts (asc | desc)",
+ "description" : "Sort resources in result by (asc | desc)",
"required" : false,
- "type" : "string",
- "default" : "WidgetLayoutInfo/user_name.asc"
+ "type" : "string"
}, {
"name" : "page_size",
"in" : "query",
@@ -613,87 +707,146 @@
}, {
"name" : "from",
"in" : "query",
- "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+ "description" : "The starting page resource (inclusive). \"start\" is also accepted.",
"required" : false,
- "type" : "string",
- "default" : "0"
+ "type" : "integer",
+ "default" : 0,
+ "minimum" : 0.0
}, {
"name" : "to",
"in" : "query",
- "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+ "description" : "The ending page resource (inclusive). \"end\" is also accepted.",
"required" : false,
- "type" : "string"
+ "type" : "integer",
+ "minimum" : 1.0
} ],
"responses" : {
"200" : {
- "description" : "successful operation",
+ "description" : "Successful operation",
"schema" : {
"type" : "array",
"items" : {
- "$ref" : "#/definitions/ActiveWidgetLayoutResponse"
+ "$ref" : "#/definitions/ClusterArtifactResponse"
}
}
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
},
"put" : {
- "tags" : [ "Users" ],
- "summary" : "Update user widget layouts",
- "description" : "Updates user widget layout.",
- "operationId" : "ActiveWidgetLayoutService#updateServices",
+ "tags" : [ "clusters" ],
+ "summary" : "Updates multiple artifacts",
+ "description" : "",
+ "operationId" : "updateClusterArtifacts",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "userName",
+ "name" : "clusterName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
- "description" : "input parameters in json form",
- "required" : true,
+ "required" : false,
"schema" : {
- "$ref" : "#/definitions/ActiveWidgetLayoutRequest"
+ "$ref" : "#/definitions/ClusterArtifactRequest"
}
} ],
"responses" : {
"200" : {
"description" : "Successful operation"
},
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
+ }
+ }
+ },
+ "delete" : {
+ "tags" : [ "clusters" ],
+ "summary" : "Deletes all artifacts of a cluster that match the provided predicate",
+ "description" : "",
+ "operationId" : "deleteClusterArtifacts",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "clusterName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
}
},
- "/users/{userName}/authorizations" : {
+ "/clusters/{clusterName}/artifacts/{artifactName}" : {
"get" : {
- "tags" : [ "Users" ],
- "summary" : "Get all authorizations",
- "description" : "Returns all authorization for user.",
- "operationId" : "UserAuthorizationService#getAuthorizations",
+ "tags" : [ "clusters" ],
+ "summary" : "Get the details of a cluster artifact",
+ "description" : "",
+ "operationId" : "getClusterArtifact",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "userName",
+ "name" : "clusterName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "artifactName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
}, {
"name" : "fields",
"in" : "query",
- "description" : "Filter user authorization details",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
- "type" : "string",
- "default" : "AuthorizationInfo/*"
+ "type" : "string"
}, {
"name" : "sortBy",
"in" : "query",
- "description" : "Sort user authorizations (asc | desc)",
+ "description" : "Sort resources in result by (asc | desc)",
"required" : false,
- "type" : "string",
- "default" : "AuthorizationInfo/user_name.asc"
+ "type" : "string"
}, {
"name" : "page_size",
"in" : "query",
@@ -704,187 +857,188 @@
}, {
"name" : "from",
"in" : "query",
- "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+ "description" : "The starting page resource (inclusive). \"start\" is also accepted.",
"required" : false,
"type" : "string",
"default" : "0"
}, {
"name" : "to",
"in" : "query",
- "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+ "description" : "The ending page resource (inclusive). \"end\" is also accepted.",
"required" : false,
"type" : "string"
} ],
"responses" : {
"200" : {
- "description" : "successful operation",
+ "description" : "Successful operation",
"schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/UserAuthorizationResponse"
- }
+ "$ref" : "#/definitions/ClusterArtifactResponse"
}
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
- }
- },
- "/users/{userName}/authorizations/{authorization_id}" : {
- "get" : {
- "tags" : [ "Users" ],
- "summary" : "Get user authorization",
- "description" : "Returns user authorization details.",
- "operationId" : "UserAuthorizationService#getAuthorization",
+ },
+ "post" : {
+ "tags" : [ "clusters" ],
+ "summary" : "Creates a cluster artifact",
+ "description" : "",
+ "operationId" : "createClusterArtifact",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "userName",
+ "name" : "clusterName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
}, {
- "name" : "authorization_id",
+ "name" : "artifactName",
"in" : "path",
- "description" : "Authorization Id",
"required" : true,
"type" : "string"
}, {
- "name" : "fields",
- "in" : "query",
- "description" : "Filter user authorization details",
+ "in" : "body",
+ "name" : "body",
"required" : false,
- "type" : "string",
- "default" : "AuthorizationInfo/*"
- } ],
+ "schema" : {
+ "$ref" : "#/definitions/ClusterArtifactRequest"
+ }
+ } ],
"responses" : {
- "200" : {
- "description" : "Successful operation",
- "schema" : {
- "$ref" : "#/definitions/UserAuthorizationResponse"
- }
+ "201" : {
+ "description" : "Successful operation"
+ },
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "409" : {
+ "description" : "The requested resource already exists."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
- }
- },
- "/users/{userName}/privileges" : {
- "get" : {
- "tags" : [ "Users" ],
- "summary" : "Get all privileges",
- "description" : "Returns all privileges for user.",
- "operationId" : "UserPrivilegeService#getPrivileges",
+ },
+ "put" : {
+ "tags" : [ "clusters" ],
+ "summary" : "Updates a single artifact",
+ "description" : "",
+ "operationId" : "updateClusterArtifact",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "userName",
+ "name" : "clusterName",
"in" : "path",
- "description" : "user name",
"required" : true,
- "type" : "string",
- "default" : "admin"
- }, {
- "name" : "fields",
- "in" : "query",
- "description" : "Filter user privileges",
- "required" : false,
- "type" : "string",
- "default" : "PrivilegeInfo/*"
- }, {
- "name" : "sortBy",
- "in" : "query",
- "description" : "Sort user privileges (asc | desc)",
- "required" : false,
- "type" : "string",
- "default" : "PrivilegeInfo/user_name.asc"
- }, {
- "name" : "page_size",
- "in" : "query",
- "description" : "The number of resources to be returned for the paged response.",
- "required" : false,
- "type" : "integer",
- "default" : 10
+ "type" : "string"
}, {
- "name" : "from",
- "in" : "query",
- "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
- "required" : false,
- "type" : "string",
- "default" : "0"
+ "name" : "artifactName",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
}, {
- "name" : "to",
- "in" : "query",
- "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+ "in" : "body",
+ "name" : "body",
"required" : false,
- "type" : "string"
+ "schema" : {
+ "$ref" : "#/definitions/ClusterArtifactRequest"
+ }
} ],
"responses" : {
"200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/UserPrivilegeResponse"
- }
- }
+ "description" : "Successful operation"
+ },
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
- }
- },
- "/users/{userName}/privileges/{privilegeId}" : {
- "get" : {
- "tags" : [ "Users" ],
- "summary" : "Get user privilege",
- "description" : "Returns user privilege details.",
- "operationId" : "UserPrivilegeService#getPrivilege",
+ },
+ "delete" : {
+ "tags" : [ "clusters" ],
+ "summary" : "Deletes a single artifact",
+ "description" : "",
+ "operationId" : "deleteClusterArtifact",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "userName",
+ "name" : "clusterName",
"in" : "path",
- "description" : "user name",
"required" : true,
"type" : "string"
}, {
- "name" : "privilegeId",
+ "name" : "artifactName",
"in" : "path",
- "description" : "privilege id",
"required" : true,
"type" : "string"
- }, {
- "name" : "fields",
- "in" : "query",
- "description" : "Filter user privilege details",
- "required" : false,
- "type" : "string",
- "default" : "PrivilegeInfo/*"
} ],
"responses" : {
"200" : {
- "description" : "Successful operation",
- "schema" : {
- "$ref" : "#/definitions/UserPrivilegeResponse"
- }
+ "description" : "Successful operation"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
}
},
- "/views" : {
+ "/groups" : {
"get" : {
- "tags" : [ "Views" ],
- "summary" : "Get all views",
- "description" : "Returns details of all views.",
- "operationId" : "ViewService#getViews",
+ "tags" : [ "Groups" ],
+ "summary" : "Get all groups",
+ "description" : "Returns details of all groups.",
+ "operationId" : "GroupService#getGroups",
"produces" : [ "text/plain" ],
"parameters" : [ {
"name" : "fields",
"in" : "query",
- "description" : "Filter view details",
+ "description" : "Filter group details",
"required" : false,
"type" : "string",
- "default" : "ViewInfo/*"
+ "default" : "Groups/*"
}, {
"name" : "sortBy",
"in" : "query",
- "description" : "Sort users (asc | desc)",
+ "description" : "Sort groups (asc | desc)",
"required" : false,
"type" : "string",
- "default" : "ViewInfo/view_name.asc"
+ "default" : "Groups/group_name.asc"
}, {
"name" : "page_size",
"in" : "query",
@@ -908,75 +1062,121 @@
} ],
"responses" : {
"200" : {
- "description" : "Successful operation",
+ "description" : "Successful retrieval of all group entries",
"schema" : {
"type" : "array",
"items" : {
- "$ref" : "#/definitions/ViewResponse"
+ "$ref" : "#/definitions/GroupResponse"
}
}
}
}
+ },
+ "post" : {
+ "tags" : [ "Groups" ],
+ "summary" : "Create new group",
+ "description" : "Creates group resource.",
+ "operationId" : "GroupService#createGroup",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "body",
+ "description" : "input parameters in json form",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/GroupRequest"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation"
+ },
+ "500" : {
+ "description" : "Server Error"
+ }
+ }
}
},
- "/views/{viewName}" : {
+ "/groups/{groupName}" : {
"get" : {
- "tags" : [ "Views" ],
- "summary" : "Get single view",
- "description" : "Returns view details.",
- "operationId" : "ViewService#getView",
+ "tags" : [ "Groups" ],
+ "summary" : "Get group",
+ "description" : "Returns group details.",
+ "operationId" : "GroupService#getGroup",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
+ "name" : "groupName",
"in" : "path",
- "description" : "view name",
+ "description" : "group name",
"required" : true,
"type" : "string"
}, {
"name" : "fields",
"in" : "query",
- "description" : "Filter view details",
+ "description" : "Filter group details",
"required" : false,
"type" : "string",
- "default" : "ViewInfo"
+ "default" : "Groups"
} ],
"responses" : {
"200" : {
- "description" : "Successful operation",
+ "description" : "Successful retrieval of group resource",
"schema" : {
- "$ref" : "#/definitions/ViewResponse"
+ "$ref" : "#/definitions/GroupResponse"
}
}
}
+ },
+ "delete" : {
+ "tags" : [ "Groups" ],
+ "summary" : "Delete group",
+ "description" : "Delete group resource.",
+ "operationId" : "GroupService#deleteGroup",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "groupName",
+ "in" : "path",
+ "description" : "group name",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation"
+ },
+ "500" : {
+ "description" : "Server Error"
+ }
+ }
}
},
- "/views/{viewName}/versions" : {
+ "/groups/{groupName}/members" : {
"get" : {
- "tags" : [ "Views" ],
- "summary" : "Get all versions for a view",
- "description" : "Returns details of all versions for a view.",
- "operationId" : "ViewVersionService#getVersions",
+ "tags" : [ "Groups" ],
+ "summary" : "Get all group members",
+ "description" : "Returns details of all members.",
+ "operationId" : "MemberService#getMembers",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
+ "name" : "groupName",
"in" : "path",
- "description" : "view name",
+ "description" : "group name",
"required" : true,
"type" : "string"
}, {
"name" : "fields",
"in" : "query",
- "description" : "Filter view version details",
+ "description" : "Filter member details",
"required" : false,
"type" : "string",
- "default" : "ViewVersionInfo/*"
+ "default" : "MemberInfo/*"
}, {
"name" : "sortBy",
"in" : "query",
- "description" : "Sort users (asc | desc)",
+ "description" : "Sort members (asc | desc)",
"required" : false,
"type" : "string",
- "default" : "ViewVersionInfo/version.desc"
+ "default" : "MemberInfo/user_name.asc"
}, {
"name" : "page_size",
"in" : "query",
@@ -1004,80 +1204,135 @@
"schema" : {
"type" : "array",
"items" : {
- "$ref" : "#/definitions/ViewVersionResponse"
+ "$ref" : "#/definitions/MemberResponse"
}
}
}
}
- }
- },
- "/views/{viewName}/versions/{version}" : {
- "get" : {
- "tags" : [ "Views" ],
- "summary" : "Get single view version",
- "description" : "Returns view details.",
- "operationId" : "ViewVersionService#getVersion",
+ },
+ "put" : {
+ "tags" : [ "Groups" ],
+ "summary" : "Update group members",
+ "description" : "Updates group member resources.",
+ "operationId" : "MemberService#updateMembers",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
+ "name" : "groupName",
"in" : "path",
- "description" : "view name",
+ "description" : "group name",
"required" : true,
"type" : "string"
}, {
- "name" : "version",
- "in" : "path",
+ "in" : "body",
+ "name" : "body",
+ "description" : "input parameters in json form",
"required" : true,
- "type" : "string"
- }, {
- "name" : "fields",
+ "schema" : {
+ "$ref" : "#/definitions/MemberRequest"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation"
+ },
+ "500" : {
+ "description" : "Server Error"
+ }
+ }
+ }
+ },
+ "/groups/{groupName}/members/{userName}" : {
+ "get" : {
+ "tags" : [ "Groups" ],
+ "summary" : "Get group member",
+ "description" : "Returns member details.",
+ "operationId" : "MemberService#getMember",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "groupName",
+ "in" : "path",
+ "description" : "group name",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "userName",
+ "in" : "path",
+ "description" : "user name",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "fields",
"in" : "query",
- "description" : "Filter view details",
+ "description" : "Filter member details",
"required" : false,
"type" : "string",
- "default" : "ViewVersionInfo"
+ "default" : "MemberInfo"
} ],
"responses" : {
"200" : {
"description" : "Successful operation",
"schema" : {
- "$ref" : "#/definitions/ViewVersionResponse"
+ "$ref" : "#/definitions/MemberResponse"
}
}
}
- }
- },
- "/views/{viewName}/versions/{version}/instances" : {
- "get" : {
- "tags" : [ "Views" ],
- "summary" : "Get all view instances",
- "description" : "Returns all instances for a view version.",
- "operationId" : "ViewInstanceService#getServices",
+ },
+ "delete" : {
+ "tags" : [ "Groups" ],
+ "summary" : "Delete group member",
+ "description" : "Delete member resource.",
+ "operationId" : "MemberService#deleteMember",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
+ "name" : "groupName",
"in" : "path",
+ "description" : "group name",
"required" : true,
"type" : "string"
}, {
- "name" : "version",
+ "name" : "userName",
+ "in" : "path",
+ "description" : "user name",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation"
+ },
+ "500" : {
+ "description" : "Server Error"
+ }
+ }
+ }
+ },
+ "/groups/{groupName}/privileges" : {
+ "get" : {
+ "tags" : [ "Groups" ],
+ "summary" : "Get all privileges",
+ "description" : "Returns all privileges for group.",
+ "operationId" : "GroupPrivilegeService#getPrivileges",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "groupName",
"in" : "path",
+ "description" : "group name",
"required" : true,
"type" : "string"
}, {
"name" : "fields",
"in" : "query",
- "description" : "Filter view instance details",
+ "description" : "Filter user privileges",
"required" : false,
"type" : "string",
- "default" : "ViewInstanceInfo/*"
+ "default" : "PrivilegeInfo/*"
}, {
"name" : "sortBy",
"in" : "query",
- "description" : "Sort users (asc | desc)",
+ "description" : "Sort user privileges (asc | desc)",
"required" : false,
"type" : "string",
- "default" : "ViewInstanceInfo/instance_name.desc"
+ "default" : "PrivilegeInfo/user_name.asc"
}, {
"name" : "page_size",
"in" : "query",
@@ -1101,208 +1356,376 @@
} ],
"responses" : {
"200" : {
- "description" : "Successful operation",
+ "description" : "successful operation",
"schema" : {
"type" : "array",
"items" : {
- "$ref" : "#/definitions/ViewInstanceResponse"
+ "$ref" : "#/definitions/GroupPrivilegeResponse"
}
}
}
}
}
},
- "/views/{viewName}/versions/{version}/instances/{instanceName}" : {
+ "/groups/{groupName}/privileges/{privilegeId}" : {
"get" : {
- "tags" : [ "Views" ],
- "summary" : "Get single view instance",
- "description" : "Returns view instance details.",
- "operationId" : "ViewInstanceService#getService",
+ "tags" : [ "Groups" ],
+ "summary" : "Get group privilege",
+ "description" : "Returns group privilege details.",
+ "operationId" : "GroupPrivilegeService#getPrivilege",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
- "in" : "path",
- "description" : "view name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "version",
+ "name" : "groupName",
"in" : "path",
+ "description" : "group name",
"required" : true,
"type" : "string"
}, {
- "name" : "instanceName",
+ "name" : "privilegeId",
"in" : "path",
- "description" : "instance name",
+ "description" : "privilege id",
"required" : true,
"type" : "string"
}, {
"name" : "fields",
"in" : "query",
- "description" : "Filter view instance details",
+ "description" : "Filter group privilege details",
"required" : false,
"type" : "string",
- "default" : "ViewInstanceInfo"
+ "default" : "PrivilegeInfo/*"
} ],
"responses" : {
"200" : {
"description" : "Successful operation",
"schema" : {
- "$ref" : "#/definitions/ViewInstanceResponse"
+ "$ref" : "#/definitions/PrivilegeResponse"
}
}
}
- },
- "post" : {
- "tags" : [ "Views" ],
- "summary" : "Create view instance",
- "description" : "Creates view instance resource.",
- "operationId" : "ViewInstanceService#createService",
+ }
+ },
+ "/hosts" : {
+ "get" : {
+ "tags" : [ "hosts" ],
+ "summary" : "Returns a collection of all hosts",
+ "description" : "",
+ "operationId" : "getHosts",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
- "in" : "path",
- "description" : "view name",
- "required" : true,
- "type" : "string"
+ "name" : "fields",
+ "in" : "query",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
+ "required" : false,
+ "type" : "string",
+ "default" : "Hosts/*"
}, {
- "name" : "version",
- "in" : "path",
- "required" : true,
- "type" : "string"
+ "name" : "sortBy",
+ "in" : "query",
+ "description" : "Sort resources in result by (asc | desc)",
+ "required" : false,
+ "type" : "string",
+ "default" : "Hosts/host_name.asc"
}, {
- "name" : "instanceName",
- "in" : "path",
- "description" : "instance name",
- "required" : true,
- "type" : "string"
+ "name" : "page_size",
+ "in" : "query",
+ "description" : "The number of resources to be returned for the paged response.",
+ "required" : false,
+ "type" : "integer",
+ "default" : 10
+ }, {
+ "name" : "from",
+ "in" : "query",
+ "description" : "The starting page resource (inclusive). \"start\" is also accepted.",
+ "required" : false,
+ "type" : "integer",
+ "default" : 0,
+ "minimum" : 0.0
}, {
+ "name" : "to",
+ "in" : "query",
+ "description" : "The ending page resource (inclusive). \"end\" is also accepted.",
+ "required" : false,
+ "type" : "integer",
+ "minimum" : 1.0
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/Wrapper"
+ }
+ }
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "Cluster not found"
+ },
+ "500" : {
+ "description" : "Internal server error"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "hosts" ],
+ "summary" : "Creates multiple hosts in a single request",
+ "description" : "",
+ "operationId" : "createHosts",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
"in" : "body",
"name" : "body",
- "description" : "input parameters in json form",
- "required" : true,
+ "required" : false,
"schema" : {
- "$ref" : "#/definitions/ViewInstanceRequest"
+ "$ref" : "#/definitions/HostRequest"
}
} ],
"responses" : {
- "200" : {
+ "201" : {
"description" : "Successful operation"
},
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Attempt to add hosts that have not been registered"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "Cluster not found"
+ },
+ "409" : {
+ "description" : "Attempt to create a host which already exists"
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
},
"put" : {
- "tags" : [ "Views" ],
- "summary" : "Update view instance detail",
- "description" : "Updates view instance resource.",
- "operationId" : "ViewInstanceService#updateService",
+ "tags" : [ "hosts" ],
+ "summary" : "Updates multiple hosts in a single request",
+ "description" : "",
+ "operationId" : "updateHosts",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
- "in" : "path",
- "description" : "view name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "version",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "instanceName",
- "in" : "path",
- "description" : "instance name",
- "required" : true,
- "type" : "string"
- }, {
"in" : "body",
"name" : "body",
- "description" : "input parameters in json form",
- "required" : true,
+ "required" : false,
"schema" : {
- "$ref" : "#/definitions/ViewInstanceRequest"
+ "$ref" : "#/definitions/HostRequest"
}
} ],
"responses" : {
"200" : {
"description" : "Successful operation"
},
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "Cluster or host not found"
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
},
"delete" : {
- "tags" : [ "Views" ],
- "summary" : "Delete view instance",
- "description" : "Delete view resource.",
- "operationId" : "ViewInstanceService#deleteService",
+ "tags" : [ "hosts" ],
+ "summary" : "Deletes multiple hosts in a single request",
+ "description" : "",
+ "operationId" : "deleteHosts",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
- "in" : "path",
- "description" : "view name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "version",
- "in" : "path",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "instanceName",
- "in" : "path",
- "description" : "instance name",
- "required" : true,
- "type" : "string"
- } ],
+ "in" : "body",
+ "name" : "body",
+ "required" : false,
+ "schema" : {
+ "$ref" : "#/definitions/HostRequest"
+ }
+ } ],
"responses" : {
"200" : {
"description" : "Successful operation"
},
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "Cluster or host not found"
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
}
},
- "/views/{viewName}/versions/{version}/instances/{instanceName}/migrate/{originVersion}/{originInstanceName}" : {
- "put" : {
- "tags" : [ "Views" ],
- "summary" : "Migrate view instance data",
- "description" : "Migrates view instance persistence data from origin view instance specified in the path params.",
- "operationId" : "ViewDataMigrationService#migrateData",
+ "/hosts/{hostName}" : {
+ "get" : {
+ "tags" : [ "hosts" ],
+ "summary" : "Returns information about a single host",
+ "description" : "",
+ "operationId" : "getHost",
+ "produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
+ "name" : "hostName",
"in" : "path",
- "description" : "view name",
+ "description" : "host name",
"required" : true,
"type" : "string"
}, {
- "name" : "version",
- "in" : "path",
- "description" : "view version",
- "required" : true,
+ "name" : "fields",
+ "in" : "query",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
+ "required" : false,
"type" : "string"
- }, {
- "name" : "instanceName",
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/Wrapper"
+ }
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "Cluster or host not found"
+ },
+ "500" : {
+ "description" : "Internal server error"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "hosts" ],
+ "summary" : "Creates a host",
+ "description" : "",
+ "operationId" : "createHost",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "hostName",
"in" : "path",
- "description" : "instance name",
+ "description" : "host name",
"required" : true,
"type" : "string"
}, {
- "name" : "originVersion",
+ "in" : "body",
+ "name" : "body",
+ "required" : false,
+ "schema" : {
+ "$ref" : "#/definitions/HostRequest"
+ }
+ } ],
+ "responses" : {
+ "201" : {
+ "description" : "Successful operation"
+ },
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "Cluster not found"
+ },
+ "409" : {
+ "description" : "Attempt to create a host which already exists"
+ },
+ "500" : {
+ "description" : "Internal server error"
+ }
+ }
+ },
+ "put" : {
+ "tags" : [ "hosts" ],
+ "summary" : "Updates a host",
+ "description" : "",
+ "operationId" : "updateHost",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "hostName",
"in" : "path",
- "description" : "origin version",
+ "description" : "host name",
"required" : true,
"type" : "string"
}, {
- "name" : "originInstanceName",
+ "in" : "body",
+ "name" : "body",
+ "required" : false,
+ "schema" : {
+ "$ref" : "#/definitions/HostRequest"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation"
+ },
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "Cluster or host not found"
+ },
+ "500" : {
+ "description" : "Internal server error"
+ }
+ }
+ },
+ "delete" : {
+ "tags" : [ "hosts" ],
+ "summary" : "Deletes a host",
+ "description" : "",
+ "operationId" : "deleteHost",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "hostName",
"in" : "path",
- "description" : "origin instance name",
+ "description" : "host name",
"required" : true,
"type" : "string"
} ],
@@ -1310,51 +1733,42 @@
"200" : {
"description" : "Successful operation"
},
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "Cluster or host not found"
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
}
},
- "/views/{viewName}/versions/{version}/instances/{instanceName}/privileges" : {
+ "/requests" : {
"get" : {
- "tags" : [ "Views" ],
- "summary" : "Get all view instance privileges",
- "description" : "Returns all privileges for the resource.",
- "operationId" : "ViewPrivilegeService#getPrivileges",
+ "tags" : [ "Requests" ],
+ "summary" : "Get all requests. A predicate can be given to filter results.",
+ "description" : "",
+ "operationId" : "RequestService#getRequests",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
- "in" : "path",
- "description" : "view name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "version",
- "in" : "path",
- "description" : "view version",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "instanceName",
- "in" : "path",
- "description" : "instance name",
- "required" : true,
- "type" : "string"
- }, {
"name" : "fields",
"in" : "query",
- "description" : "Filter privileges",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
"type" : "string",
- "default" : "PrivilegeInfo/*"
+ "default" : "Requests/id"
}, {
"name" : "sortBy",
"in" : "query",
- "description" : "Sort privileges (asc | desc)",
+ "description" : "Sort resources in result by (asc | desc)",
"required" : false,
"type" : "string",
- "default" : "PrivilegeInfo/user_name.asc"
+ "default" : "Requests/id.asc"
}, {
"name" : "page_size",
"in" : "query",
@@ -1365,207 +1779,262 @@
}, {
"name" : "from",
"in" : "query",
- "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+ "description" : "The starting page resource (inclusive). \"start\" is also accepted.",
"required" : false,
"type" : "string",
"default" : "0"
}, {
"name" : "to",
"in" : "query",
- "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+ "description" : "The ending page resource (inclusive). \"end\" is also accepted.",
"required" : false,
"type" : "string"
} ],
"responses" : {
"200" : {
- "description" : "successful operation",
+ "description" : "Successful operation",
"schema" : {
"type" : "array",
"items" : {
- "$ref" : "#/definitions/ViewPrivilegeResponse"
+ "$ref" : "#/definitions/RequestResponse"
}
}
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
},
"post" : {
- "tags" : [ "Views" ],
- "summary" : "Create view instance privilege",
- "description" : "Create privilege resource for view instance.",
- "operationId" : "ViewPrivilegeService#createPrivilege",
+ "tags" : [ "Requests" ],
+ "summary" : "Creates one or more Requests",
+ "description" : "",
+ "operationId" : "RequestService#createRequests",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
- "in" : "path",
- "description" : "view name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "version",
- "in" : "path",
- "description" : "view version",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "instanceName",
- "in" : "path",
- "description" : "instance name",
- "required" : true,
- "type" : "string"
- }, {
"in" : "body",
"name" : "body",
- "description" : "input parameters in json form",
- "required" : true,
+ "required" : false,
"schema" : {
- "$ref" : "#/definitions/ViewPrivilegeRequest"
+ "$ref" : "#/definitions/RequestPostRequest"
}
} ],
"responses" : {
- "200" : {
+ "201" : {
"description" : "Successful operation"
},
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet",
+ "schema" : {
+ "$ref" : "#/definitions/RequestPostResponse"
+ }
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "409" : {
+ "description" : "The requested resource already exists."
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
}
},
- "/views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeId}" : {
+ "/requests/{requestId}" : {
"get" : {
- "tags" : [ "Views" ],
- "summary" : "Get single view instance privilege",
- "description" : "Returns privilege details.",
- "operationId" : "ViewPrivilegeService#getPrivilege",
+ "tags" : [ "Requests" ],
+ "summary" : "Get the details of a request",
+ "description" : "",
+ "operationId" : "RequestService#getRequest",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
- "in" : "path",
- "description" : "view name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "version",
- "in" : "path",
- "description" : "view version",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "instanceName",
- "in" : "path",
- "description" : "instance name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "privilegeId",
+ "name" : "requestId",
"in" : "path",
- "description" : "privilege id",
"required" : true,
"type" : "string"
}, {
"name" : "fields",
"in" : "query",
- "description" : "Filter privilege details",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
"type" : "string",
- "default" : "PrivilegeInfo"
+ "default" : "Requests/*"
} ],
"responses" : {
"200" : {
"description" : "Successful operation",
"schema" : {
- "$ref" : "#/definitions/ViewPrivilegeResponse"
+ "$ref" : "#/definitions/RequestResponse"
}
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
}
}
},
- "delete" : {
- "tags" : [ "Views" ],
- "summary" : "Delete view instance privilege",
- "description" : "Delete view instance privilege resource.",
- "operationId" : "ViewPrivilegeService#deletePrivilege",
+ "put" : {
+ "tags" : [ "Requests" ],
+ "summary" : "Updates a request, usually used to cancel running requests.",
+ "description" : "Changes the state of an existing request. Usually used to cancel running requests.",
+ "operationId" : "RequestService#updateRequests",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
- "in" : "path",
- "description" : "view name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "version",
- "in" : "path",
- "description" : "view version",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "instanceName",
+ "name" : "requestId",
"in" : "path",
- "description" : "instance name",
"required" : true,
"type" : "string"
}, {
- "name" : "privilegeId",
- "in" : "path",
- "description" : "privilege id",
- "required" : true,
- "type" : "string"
+ "in" : "body",
+ "name" : "body",
+ "required" : false,
+ "schema" : {
+ "$ref" : "#/definitions/RequestPutRequest"
+ }
} ],
"responses" : {
"200" : {
"description" : "Successful operation"
},
+ "202" : {
+ "description" : "Request is accepted, but not completely processed yet"
+ },
+ "400" : {
+ "description" : "Invalid arguments"
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
"500" : {
- "description" : "Server Error"
+ "description" : "Internal server error"
}
}
}
},
- "/views/{viewName}/versions/{version}/permissions" : {
+ "/services" : {
"get" : {
- "tags" : [ "Views" ],
- "summary" : "Get all permissions for a view",
- "description" : "Returns all permission details for the version of a view.",
- "operationId" : "ViewPermissionService#getPermissions",
+ "tags" : [ "services" ],
+ "summary" : "Returns the list of root-level services",
+ "description" : "",
+ "operationId" : "getRootServices",
"produces" : [ "text/plain" ],
"parameters" : [ {
- "name" : "viewName",
- "in" : "path",
- "description" : "view name",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "version",
- "in" : "path",
- "description" : "view version",
- "required" : true,
- "type" : "string"
- }, {
"name" : "fields",
"in" : "query",
- "description" : "Filter privileges",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
"type" : "string",
- "default" : "PermissionInfo/*"
- }, {
- "name" : "page_size",
- "in" : "query",
- "description" : "The number of resources to be returned for the paged response.",
- "required" : false,
- "type" : "integer",
- "default" : 10
+ "default" : "RootService/service_name"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/RootServiceResponseWrapper"
+ }
+ }
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "500" : {
+ "description" : "Internal server error"
+ }
+ }
+ }
+ },
+ "/services/{serviceName}" : {
+ "get" : {
+ "tags" : [ "services" ],
+ "summary" : "Returns information about the given root-level service, including a list of its components",
+ "description" : "",
+ "operationId" : "getRootService",
+ "produces" : [ "text/plain" ],
+ "parameters" : [ {
+ "name" : "serviceName",
+ "in" : "path",
+ "description" : "service name",
+ "required" : true,
+ "type" : "string"
}, {
- "name" : "from",
+ "name" : "fields",
"in" : "query",
- "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+ "description" : "Filter fields in the response (identifier fields are mandatory)",
"required" : false,
"type" : "string",
- "default" : "0"
+ "default" : "RootService/service_name, components/RootServiceComponents/component_name, components/RootServiceComponents/service_name"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "Successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/RootServiceResponseWithComponentList"
+ }
+ },
+ "401" : {
+ "description" : "Not authenticated"
+ },
+ "403" : {
+ "description" : "Not permitted to perform the operation"
+ },
+ "404" : {
+ "description" : "The requested resource doesn't exist."
+ },
+ "500" : {
+ "description" : "Internal server error"
+ }
+ }
+ }
+ },
+ "/services/{serviceName}/components" : {
+ "get" : {
+ "tags" : [ "services" ],
+ "summary" : "Returns the list of components for the given root-level service",
+ "description" : "",
+ "operationId" : "getRootServiceComponents",
+ "produces" : [ "text/plain" ],
+
<TRUNCATED>