service-capacity-modeling 0.3.67__py3-none-any.whl → 0.3.68__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -876,7 +876,22 @@ class CapacityDesires(ExcludeUnsetModel):
876
876
 
877
877
  @property
878
878
  def reference_shape(self) -> Instance:
879
- # TODO: this should use the shape from current clusters if it is there
879
+ if not self.current_clusters:
880
+ return default_reference_shape
881
+
882
+ zonal, regional = (self.current_clusters.zonal, self.current_clusters.regional)
883
+ if zonal and regional:
884
+ raise ValueError(
885
+ "The current cluster should not have both "
886
+ "zonal and regional instances. They're mutually exclusive."
887
+ )
888
+
889
+ if zonal and zonal[0].cluster_instance:
890
+ return zonal[0].cluster_instance
891
+
892
+ if regional and regional[0].cluster_instance:
893
+ return regional[0].cluster_instance
894
+
880
895
  return default_reference_shape
881
896
 
882
897
  def merge_with(self, defaults: "CapacityDesires") -> "CapacityDesires":
@@ -900,7 +900,7 @@ def zonal_requirements_from_current(
900
900
  mem_gib=certain_float(needed_memory_gib),
901
901
  disk_gib=certain_float(needed_disk_gib),
902
902
  network_mbps=certain_float(needed_network_mbps),
903
- reference_shape=current_capacity.cluster_instance,
903
+ reference_shape=reference_shape,
904
904
  )
905
905
  else:
906
906
  raise ValueError("Please check if current_cluster is populated correctly.")
@@ -164,7 +164,6 @@ def _estimate_cassandra_requirement( # pylint: disable=too-many-positional-argu
164
164
  capacity_requirement = zonal_requirements_from_current(
165
165
  desires.current_clusters, desires.buffers, instance, reference_shape
166
166
  )
167
- reference_shape = capacity_requirement.reference_shape
168
167
  disk_scale, _ = derived_buffer_for_component(
169
168
  desires.buffers.derived, ["storage", "disk"]
170
169
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: service-capacity-modeling
3
- Version: 0.3.67
3
+ Version: 0.3.68
4
4
  Summary: Contains utilities for modeling capacity for pluggable workloads
5
5
  Author: Joseph Lynch
6
6
  Author-email: josephl@netflix.com
@@ -1,6 +1,6 @@
1
1
  service_capacity_modeling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  service_capacity_modeling/capacity_planner.py,sha256=B6e0esOAvV6qMkEeLIO9rEveTftRG_Ut_d9gYgSIM0w,31914
3
- service_capacity_modeling/interface.py,sha256=eJRahrVv-JMbalwd6gqVLbtvCoBhZSLyG-mm8asOBD4,36993
3
+ service_capacity_modeling/interface.py,sha256=-nwCW67LBoxR9I_FZxkMmB0n4VS21gqrdfDCskZ0w7E,37493
4
4
  service_capacity_modeling/stats.py,sha256=8HIPwVnmvbauBwXhn6vbNYO7-CzWPuymnq0eX7ZA1_w,5849
5
5
  service_capacity_modeling/hardware/__init__.py,sha256=kzIHnIymwnf4qQYDpfIChIAxTF8b87XtnBg1TwF_J9E,8974
6
6
  service_capacity_modeling/hardware/profiles/__init__.py,sha256=7-y3JbCBkgzaAjFla2RIymREcImdZ51HTl3yn3vzoGw,1602
@@ -40,13 +40,13 @@ service_capacity_modeling/hardware/profiles/shapes/aws/manual_drives.json,sha256
40
40
  service_capacity_modeling/hardware/profiles/shapes/aws/manual_instances.json,sha256=i611n6d7hsjd7L8aSEDzfaTMS2jVs-Jc38-vl-NKfs4,18013
41
41
  service_capacity_modeling/hardware/profiles/shapes/aws/manual_services.json,sha256=h63675KKmu5IrI3BORDN8fiAqLjAyYHArErKbC7-T30,776
42
42
  service_capacity_modeling/models/__init__.py,sha256=XK7rTBW8ZXQY5L9Uy2FwjuFN_KBW3hKw7IrhG1piajs,13567
43
- service_capacity_modeling/models/common.py,sha256=f2M3ZpQopENexwwDeoMyH57oktenz88advR2XQoNTys,33567
43
+ service_capacity_modeling/models/common.py,sha256=P4NrPbAdgNKqvVNFUfpocG44Dw8ai9jEDuYIGzRGCRM,33549
44
44
  service_capacity_modeling/models/headroom_strategy.py,sha256=QIkP_K_tK2EGAjloaGfXeAPH5M0UDCN8FlAtwV9xxTA,651
45
45
  service_capacity_modeling/models/utils.py,sha256=0F__wz9KAGhPIQfvNp-FTtTANW6-sO4FsyddnuXqSJc,2161
46
46
  service_capacity_modeling/models/org/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  service_capacity_modeling/models/org/netflix/__init__.py,sha256=m7IaQbo85NEbDvfoPJREIznpzg0YHTCrKP5C1GvnOYM,2378
48
48
  service_capacity_modeling/models/org/netflix/aurora.py,sha256=Mi9zd48k64GkKIjAs3J1S2qThguNvyWIy2dUmhwrVhc,12883
49
- service_capacity_modeling/models/org/netflix/cassandra.py,sha256=BsMx9QYSGSh4wKdJm_dR5rBHdbYlE7NMNWiYIQ0oU4w,34632
49
+ service_capacity_modeling/models/org/netflix/cassandra.py,sha256=TetxgkoZ0hTprXX1GxWpBbOWZdHPtk9VqOi1B6ZeNnw,34569
50
50
  service_capacity_modeling/models/org/netflix/counter.py,sha256=hOVRRCgCPU-A5TdLKQXc_mWTQpkKOWRNjOeECdDP7kA,9205
51
51
  service_capacity_modeling/models/org/netflix/crdb.py,sha256=AlHdGFpR1RmwQSZsiuiHLR2wTrnmtguT2MMYBDHfdiM,19697
52
52
  service_capacity_modeling/models/org/netflix/ddb.py,sha256=GDoXVIpDDY6xDB0dsiaz7RAPPj-qffTrM9N6w5-5ndg,26311
@@ -69,9 +69,9 @@ service_capacity_modeling/tools/auto_shape.py,sha256=41pfR40BN-xJS8js4BWSoqT67Jh
69
69
  service_capacity_modeling/tools/fetch_pricing.py,sha256=JkgJPTE0SVj8sdGQvo0HN-Hdv3nfA2tu7C_Arad5aX8,3762
70
70
  service_capacity_modeling/tools/generate_missing.py,sha256=uvr9fQanx3bm4KTneH-x7EOQvO7cVV0i9gdQvArPCuY,2947
71
71
  service_capacity_modeling/tools/instance_families.py,sha256=e9JWSIdljSmHI8Nb2MI5Ld9JqQ7WdOtPtV7g3oR7ZiU,7764
72
- service_capacity_modeling-0.3.67.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
73
- service_capacity_modeling-0.3.67.dist-info/METADATA,sha256=MCm5WB9zHK6G3f4II4EjCaCZK8L_miMqsNRaFe8QOpM,10214
74
- service_capacity_modeling-0.3.67.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
- service_capacity_modeling-0.3.67.dist-info/entry_points.txt,sha256=ZsjzpG5SomWpT1zCE19n1uSXKH2gTI_yc33sdl0vmJg,146
76
- service_capacity_modeling-0.3.67.dist-info/top_level.txt,sha256=H8XjTCLgR3enHq5t3bIbxt9SeUkUT8HT_SDv2dgIT_A,26
77
- service_capacity_modeling-0.3.67.dist-info/RECORD,,
72
+ service_capacity_modeling-0.3.68.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
73
+ service_capacity_modeling-0.3.68.dist-info/METADATA,sha256=6Dp2jy5MMYu0UuOser41xX75P0Nov_6tC65J8l4wHEs,10214
74
+ service_capacity_modeling-0.3.68.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
+ service_capacity_modeling-0.3.68.dist-info/entry_points.txt,sha256=ZsjzpG5SomWpT1zCE19n1uSXKH2gTI_yc33sdl0vmJg,146
76
+ service_capacity_modeling-0.3.68.dist-info/top_level.txt,sha256=H8XjTCLgR3enHq5t3bIbxt9SeUkUT8HT_SDv2dgIT_A,26
77
+ service_capacity_modeling-0.3.68.dist-info/RECORD,,