EMR: Rename get_cluster to describe_cluster (#4504)
This commit is contained in:
parent
e1298e334b
commit
13f985115b
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,3 +25,4 @@ tests/file.tmp
|
||||
.venv/
|
||||
htmlcov/
|
||||
.~c9_*
|
||||
.coverage*
|
||||
|
@ -1858,7 +1858,7 @@
|
||||
|
||||
## emr
|
||||
<details>
|
||||
<summary>40% implemented</summary>
|
||||
<summary>42% implemented</summary>
|
||||
|
||||
- [ ] add_instance_fleet
|
||||
- [X] add_instance_groups
|
||||
@ -1871,7 +1871,7 @@
|
||||
- [X] delete_security_configuration
|
||||
- [ ] delete_studio
|
||||
- [ ] delete_studio_session_mapping
|
||||
- [ ] describe_cluster
|
||||
- [X] describe_cluster
|
||||
- [X] describe_job_flows
|
||||
- [ ] describe_notebook_execution
|
||||
- [ ] describe_release_label
|
||||
|
@ -414,7 +414,7 @@ class ElasticMapReduceBackend(BaseBackend):
|
||||
return ec2_backends[self.region_name]
|
||||
|
||||
def add_applications(self, cluster_id, applications):
|
||||
cluster = self.get_cluster(cluster_id)
|
||||
cluster = self.describe_cluster(cluster_id)
|
||||
cluster.add_applications(applications)
|
||||
|
||||
def add_instance_groups(self, cluster_id, instance_groups):
|
||||
@ -444,7 +444,7 @@ class ElasticMapReduceBackend(BaseBackend):
|
||||
return steps
|
||||
|
||||
def add_tags(self, cluster_id, tags):
|
||||
cluster = self.get_cluster(cluster_id)
|
||||
cluster = self.describe_cluster(cluster_id)
|
||||
cluster.add_tags(tags)
|
||||
|
||||
def describe_job_flows(
|
||||
@ -479,7 +479,7 @@ class ElasticMapReduceBackend(BaseBackend):
|
||||
if step.id == step_id:
|
||||
return step
|
||||
|
||||
def get_cluster(self, cluster_id):
|
||||
def describe_cluster(self, cluster_id):
|
||||
if cluster_id in self.clusters:
|
||||
return self.clusters[cluster_id]
|
||||
raise EmrError("ResourceNotFoundException", "", "error_json")
|
||||
@ -578,7 +578,7 @@ class ElasticMapReduceBackend(BaseBackend):
|
||||
return result_groups
|
||||
|
||||
def remove_tags(self, cluster_id, tag_keys):
|
||||
cluster = self.get_cluster(cluster_id)
|
||||
cluster = self.describe_cluster(cluster_id)
|
||||
cluster.remove_tags(tag_keys)
|
||||
|
||||
def _manage_security_groups(
|
||||
|
@ -128,7 +128,7 @@ class ElasticMapReduceResponse(BaseResponse):
|
||||
@generate_boto3_response("DescribeCluster")
|
||||
def describe_cluster(self):
|
||||
cluster_id = self._get_param("ClusterId")
|
||||
cluster = self.backend.get_cluster(cluster_id)
|
||||
cluster = self.backend.describe_cluster(cluster_id)
|
||||
template = self.response_template(DESCRIBE_CLUSTER_TEMPLATE)
|
||||
return template.render(cluster=cluster)
|
||||
|
||||
@ -528,7 +528,7 @@ class ElasticMapReduceResponse(BaseResponse):
|
||||
@generate_boto3_response("PutAutoScalingPolicy")
|
||||
def put_auto_scaling_policy(self):
|
||||
cluster_id = self._get_param("ClusterId")
|
||||
cluster = self.backend.get_cluster(cluster_id)
|
||||
cluster = self.backend.describe_cluster(cluster_id)
|
||||
instance_group_id = self._get_param("InstanceGroupId")
|
||||
auto_scaling_policy = self._get_param("AutoScalingPolicy")
|
||||
instance_group = self.backend.put_auto_scaling_policy(
|
||||
|
Loading…
Reference in New Issue
Block a user